Skip to content

Commit

Permalink
requested revisions to PR 83
Browse files Browse the repository at this point in the history
  • Loading branch information
rsearls committed Sep 27, 2023
1 parent 36cbcb8 commit 3bd23e8
Show file tree
Hide file tree
Showing 22 changed files with 63 additions and 611 deletions.
20 changes: 20 additions & 0 deletions demos/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.jboss.intersmash</groupId>
<artifactId>intersmash-parent</artifactId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

<artifactId>intersmash-demos</artifactId>
<packaging>pom</packaging>

<modules>
<module>ws-bootable-jar-example</module>
</modules>

</project>
17 changes: 17 additions & 0 deletions demos/ws-bootable-jar-example/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
ws-bootable-jar-example
=======================

This module provides a simple POC webservice's jaxws application that is built as a bootable jar consisting of Wildfly and the jaxws war file, and then deployed to OpenShift, and tested.

The jaxws module builds 2 archives, the webservice's war file and a bootable jar to be run on OpenShift

This module demonstrates building a fresh (relatively current) version of Wildfly using Galleon for inclusion in the bootable jar, as compared to pulling a pre-existing Wildfly image from a public repository. The process enables the user to build a most currently version of Wildfly for testing.

Module, demos, is not declared in intersmash's root pom.xml file. This example must be run from directory, demos. The user will also require a test.properties file with the appropriate OpenShift reference and configuration information. The test can be run with cmd.

mvn test -pl ws-bootable-jar-example/ -amd -Dtest=SoapWildflyBootableOpenShiftJarTest \
-Dxtf.test_properties.path=/ABSOLUTE/PATH/TO/test.properties

or if test.properties resides in the demos directory cmd,

mvn test -pl ws-bootable-jar-example/ -amd -Dtest=SoapWildflyBootableOpenShiftJarTest
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,6 @@

<properties>
<formatting-style-base-directory>${project.parent.parent.parent.basedir}/ide-config</formatting-style-base-directory>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<!-- By default, the following prop is empty, stating that the build profile is none -->
<intersmash.deployments.wildfly.build.profile></intersmash.deployments.wildfly.build.profile>
<version.maven-surefire-plugin>3.0.0-M5</version.maven-surefire-plugin>
<version.jbossws-cxf>6.2.0.Final</version.jbossws-cxf>
</properties>

Expand Down Expand Up @@ -101,7 +95,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${version.maven-surefire-plugin}</version>
<configuration>
<!--
Intersmash projects always build and run on JDK11+, hence we need to pass JPMS options to the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,13 @@
@WebService(serviceName = "EndpointServiceSERVICE", name = "EndpointService", portName = "EndpointService", endpointInterface = "org.jboss.jaxws.Endpoint", targetNamespace = "http://org.jboss.ws/cxf/container")
public class EndpointImpl implements Endpoint {
@WebMethod
@Override
public String greetings(String input) {
return input + ", hello from WildFly bootable jar!";
}

@WebMethod
//@Override
@Override
public String ping() {
return "pong";
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,8 @@
import io.fabric8.kubernetes.api.model.Secret;

public class SoapWildflyBootableOpenShiftJarApplication implements BootableJarOpenShiftApplication {
// private String GROUPID = IntersmashSharedDeploymentsProperties.groupID();
private String GROUPID = "org.jboss.intersmash";
private String ARTIFACTID = "jaxws";
// private String VERSION = IntersmashSharedDeploymentsProperties.version();
private String VERSION = "0.0.1-SNAPSHOT";
static final String BOOTABLE_JAR_ARTIFACT_PACKAGING = "jar";
static final String ARTIFACT_CLASSIFIER = "bootable-openshift";
Expand Down Expand Up @@ -89,7 +87,7 @@ public String getName() {
return "ws-bootable-openshift-jar";
}

//-----------------------------
// todo remove local class impl once intersmash issue #85 is resolved
class BinarySourceImpl implements BinarySource {
Path f;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.jboss.intersmash</groupId>
<artifactId>intersmash-deployments</artifactId>
<artifactId>intersmash-demos</artifactId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
Expand Down Expand Up @@ -39,6 +39,7 @@
<version.wildfly-cloud-galleon-pack>2.0.0.Final</version.wildfly-cloud-galleon-pack>

<version.jakarta.xml.ws-api>4.0.0</version.jakarta.xml.ws-api>
<version.spotless-maven-plugin>2.35.0</version.spotless-maven-plugin>
</properties>

<dependencyManagement>
Expand Down Expand Up @@ -159,7 +160,7 @@
<groupId>org.jboss.intersmash</groupId>
<artifactId>intersmash-deployments-provider</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.fabric8</groupId>
Expand Down Expand Up @@ -215,6 +216,23 @@
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
<configuration>
<!-- define a language-specific format -->
<java>
<!-- make sure every file has the following copyright header.
optionally, Spotless can set copyright years by digging
through git history (see "license" section below) -->
<licenseHeader>
<file>${project.basedir}/../../license-header</file>
</licenseHeader>
</java>
</configuration>
</plugin>
</plugins>
</build>

<profiles>
Expand Down Expand Up @@ -274,63 +292,10 @@
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
</build>
</profile>
<profile>
<id>bootable-jar-baremetal</id>
<activation>
<file>
<exists>maven/bootable-jar-baremetal</exists>
</file>
</activation>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.wildfly.plugins</groupId>
<artifactId>wildfly-jar-maven-plugin</artifactId>
<!-- Bare metal but we still need to ensure that artifacts are installed
correctly into maven repo -->
<executions>
<execution>
<!-- Create bootable jar for bare metal environment - use already
defined configuration and add filename & cloud support -->
<id>bootable-baremetal</id>
<configuration>
<output-file-name>${project.build.finalName}-bootable-baremetal.jar</output-file-name>
</configuration>
<phase>process-test-sources</phase>
<goals>
<goal>package</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<!-- Install artifacts created by wildfly-jar-maven-plugin plugin
manually since the plugin installs it under same name -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<executions>
<execution>
<id>install-bootable-jar-baremetal</id>
<phase>generate-test-resources</phase>
<goals>
<goal>install-file</goal>
</goals>
<configuration>
<groupId>${project.groupId}</groupId>
<artifactId>${project.artifactId}</artifactId>
<version>${project.version}</version>
<packaging>jar</packaging>
<classifier>bootable-baremetal</classifier>
<file>${project.build.directory}/${project.build.finalName}-bootable-baremetal.jar
</file>
</configuration>
</execution>
</executions>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
<version>${version.spotless-maven-plugin}</version>
</plugin>
</plugins>
</pluginManagement>
Expand Down
1 change: 0 additions & 1 deletion deployments/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
<module>intersmash-deployments-shared</module>
<module>intersmash-deployments-provider</module>
<module>openshift-jakarta-sample-standalone</module>
<module>ws-bootable-jar-example</module>
</modules>

<properties>
Expand Down
Empty file.
6 changes: 0 additions & 6 deletions testsuite/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

<formatting-style-base-directory>${project.parent.basedir}/ide-config</formatting-style-base-directory>
<version.jakarta.servlet-api>6.0.0</version.jakarta.servlet-api>
<version.jakarta.inject-api>2.0.1</version.jakarta.inject-api>
</properties>

<dependencies>
Expand Down Expand Up @@ -50,10 +48,6 @@
<groupId>io.fabric8</groupId>
<artifactId>openshift-client</artifactId>
</dependency>
<dependency>
<groupId>io.fabric8</groupId>
<artifactId>kubernetes-model-core</artifactId>
</dependency>
</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,19 +238,6 @@ public static String bootableJarImageURL() {
return XTFConfig.get(BOOTABLE_JAR_IMAGE_URL);
}

// rls test start -------------------
private static final String LEGACY_WILDFLY_IMAGE_URL = "intersmash.legacy.wildfly.image";
private static final String LEGACY_WILDFLY_RUNTIME_IMAGE_URL = "intersmash.legacy.wildfly.runtime.image";

public static String legacyWildflyImageURL() {
return XTFConfig.get(LEGACY_WILDFLY_IMAGE_URL);
}

public static String legacyWildflyRuntimeImageURL() {
return XTFConfig.get(LEGACY_WILDFLY_RUNTIME_IMAGE_URL);
}
// rls test end -------------------

public static String wildflyImageURL() {
return XTFConfig.get(WILDFLY_IMAGE_URL);
}
Expand Down

This file was deleted.

This file was deleted.

Loading

0 comments on commit 3bd23e8

Please sign in to comment.