diff --git a/cics-bundle-maven-plugin/pom.xml b/cics-bundle-maven-plugin/pom.xml index 8b5888a5..476cbf63 100644 --- a/cics-bundle-maven-plugin/pom.xml +++ b/cics-bundle-maven-plugin/pom.xml @@ -203,9 +203,9 @@ true install true - test-bundle-war-final-name/pom.xml ${wiremockPort} + ${project.groupId}:${project.artifactId}:${project.version} true diff --git a/cics-bundle-maven-plugin/src/it/test-bundle-deploy-insecure/postbuild.groovy b/cics-bundle-maven-plugin/src/it/test-bundle-deploy-insecure/postbuild.groovy index a2573af7..60accb22 100644 --- a/cics-bundle-maven-plugin/src/it/test-bundle-deploy-insecure/postbuild.groovy +++ b/cics-bundle-maven-plugin/src/it/test-bundle-deploy-insecure/postbuild.groovy @@ -21,14 +21,14 @@ assert buildLog.exists() // Deployment with set assert buildLog.text.contains("""\ (deploy-with-insecure) @ test-bundle-deploy-insecure --- -[INFO] Deploying bundle to https://localhost:${wiremockPort} into region cicsplex/region +[INFO] Deploying test-app-bundle-0.0.1-SNAPSHOT.zip to https://localhost:${wiremockPort} into region cicsplex/region [INFO] Bundle deployed """) // Deployment without set assert buildLog.text.contains("""\ (deploy-and-fail-because-self-signed) @ test-bundle-deploy-insecure --- -[INFO] Deploying bundle to https://localhost:${wiremockPort} into region cicsplex/region +[INFO] Deploying test-app-bundle-0.0.1-SNAPSHOT.zip to https://localhost:${wiremockPort} into region cicsplex/region [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE """) \ No newline at end of file diff --git a/cics-bundle-maven-plugin/src/it/test-bundle-osgi-versionrange/bundle/pom.xml b/cics-bundle-maven-plugin/src/it/test-bundle-osgi-versionrange/bundle/pom.xml index fe0555d4..96b61069 100644 --- a/cics-bundle-maven-plugin/src/it/test-bundle-osgi-versionrange/bundle/pom.xml +++ b/cics-bundle-maven-plugin/src/it/test-bundle-osgi-versionrange/bundle/pom.xml @@ -34,6 +34,9 @@ @project.artifactId@ @project.version@ true + + HELLO + diff --git a/cics-bundle-maven-plugin/src/it/test-bundle-war-no-jvmserver/invoker.properties b/cics-bundle-maven-plugin/src/it/test-bundle-war-no-jvmserver/invoker.properties new file mode 100644 index 00000000..f46ab66f --- /dev/null +++ b/cics-bundle-maven-plugin/src/it/test-bundle-war-no-jvmserver/invoker.properties @@ -0,0 +1,15 @@ +### +# #%L +# CICS Bundle Maven Plugin +# %% +# Copyright (C) 2019 IBM Corp. +# %% +# This program and the accompanying materials are made +# available under the terms of the Eclipse Public License 2.0 +# which is available at https://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 +# #L% +### +# The expected result of the build, possible values are "success" (default) and "failure" +invoker.buildResult = failure diff --git a/cics-bundle-maven-plugin/src/it/test-bundle-war-no-jvmserver/pom.xml b/cics-bundle-maven-plugin/src/it/test-bundle-war-no-jvmserver/pom.xml new file mode 100644 index 00000000..f6006e4f --- /dev/null +++ b/cics-bundle-maven-plugin/src/it/test-bundle-war-no-jvmserver/pom.xml @@ -0,0 +1,68 @@ + + + 4.0.0 + com.ibm.cics.test-bundle-war-no-jvmserver + test-bundle-war-no-jvmserver + 0.0.1-SNAPSHOT + war + + + + + javax.ws.rs + javax.ws.rs-api + 2.0 + provided + + + + + + + org.apache.maven.plugins + maven-war-plugin + 3.2.3 + + false + pom.xml + test-war + + + + + maven-compiler-plugin + 3.5.1 + + 1.8 + 1.8 + + + + + @project.groupId@ + @project.artifactId@ + @project.version@ + + + + bundle-war + + + + + + + + diff --git a/cics-bundle-maven-plugin/src/it/test-bundle-war-no-jvmserver/postbuild.groovy b/cics-bundle-maven-plugin/src/it/test-bundle-war-no-jvmserver/postbuild.groovy new file mode 100644 index 00000000..b317c793 --- /dev/null +++ b/cics-bundle-maven-plugin/src/it/test-bundle-war-no-jvmserver/postbuild.groovy @@ -0,0 +1,17 @@ +/*- + * #%L + * CICS Bundle Maven Plugin + * %% + * Copyright (C) 2024 IBM Corp. + * %% + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * #L% + */ +File buildLog = new File(basedir, 'build.log') + +assert buildLog.exists() +assert buildLog.text.contains("The parameters 'jvmserver' for goal ${pluginString}:bundle-war are missing or invalid") \ No newline at end of file diff --git a/cics-bundle-maven-plugin/src/it/test-reactor-ear/test-war/src/main/java/test_war/TestEndpoint.java b/cics-bundle-maven-plugin/src/it/test-bundle-war-no-jvmserver/src/main/java/test_war/TestEndpoint.java similarity index 100% rename from cics-bundle-maven-plugin/src/it/test-reactor-ear/test-war/src/main/java/test_war/TestEndpoint.java rename to cics-bundle-maven-plugin/src/it/test-bundle-war-no-jvmserver/src/main/java/test_war/TestEndpoint.java diff --git a/cics-bundle-maven-plugin/src/it/test-reactor-ear-jvmserver/pom.xml b/cics-bundle-maven-plugin/src/it/test-reactor-ear-jvmserver/pom.xml new file mode 100644 index 00000000..6c33efb7 --- /dev/null +++ b/cics-bundle-maven-plugin/src/it/test-reactor-ear-jvmserver/pom.xml @@ -0,0 +1,50 @@ + + + 4.0.0 + + test-reactor-ear-jvmserver + parent + 0.0.1-SNAPSHOT + + pom + + + test-ear + test-bundle + + + + + + + org.apache.maven.plugins + maven-ear-plugin + 3.0.1 + + + org.apache.maven.plugins + maven-war-plugin + 3.2.2 + + + org.apache.maven.plugins + maven-compiler-plugin + 3.8.1 + + + + + + diff --git a/cics-bundle-maven-plugin/src/it/test-reactor-ear-jvmserver/postbuild.bsh b/cics-bundle-maven-plugin/src/it/test-reactor-ear-jvmserver/postbuild.bsh new file mode 100644 index 00000000..344166b7 --- /dev/null +++ b/cics-bundle-maven-plugin/src/it/test-reactor-ear-jvmserver/postbuild.bsh @@ -0,0 +1 @@ +com.ibm.cics.cbmp.PostBuildEar.assertOutput(basedir); diff --git a/cics-bundle-maven-plugin/src/it/test-reactor-ear-jvmserver/test-bundle/pom.xml b/cics-bundle-maven-plugin/src/it/test-reactor-ear-jvmserver/test-bundle/pom.xml new file mode 100644 index 00000000..2c74dcc3 --- /dev/null +++ b/cics-bundle-maven-plugin/src/it/test-reactor-ear-jvmserver/test-bundle/pom.xml @@ -0,0 +1,55 @@ + + + 4.0.0 + + test-reactor-ear-jvmserver + parent + 0.0.1-SNAPSHOT + + + test-bundle + cics-bundle + + + + ${project.groupId} + test-ear + ${project.version} + ear + + + + + + + @project.groupId@ + @project.artifactId@ + @project.version@ + true + + + + + test-ear + + EYUCMCIJ + + + + + + + + diff --git a/cics-bundle-maven-plugin/src/it/test-reactor-ear-jvmserver/test-ear/pom.xml b/cics-bundle-maven-plugin/src/it/test-reactor-ear-jvmserver/test-ear/pom.xml new file mode 100644 index 00000000..c1d70818 --- /dev/null +++ b/cics-bundle-maven-plugin/src/it/test-reactor-ear-jvmserver/test-ear/pom.xml @@ -0,0 +1,55 @@ + + + 4.0.0 + + test-reactor-ear-jvmserver + parent + 0.0.1-SNAPSHOT + + + test-ear + ear + + + + + javax.ws.rs + javax.ws.rs-api + 2.0 + provided + + + com.ibm.cics + test-war + 1.0.0 + war + + + + + + + org.apache.maven.plugins + maven-ear-plugin + + false + pom.xml + test-ear + + + + + + diff --git a/cics-bundle-maven-plugin/src/it/test-reactor-ear-nodefaultjvmserver/invoker.properties b/cics-bundle-maven-plugin/src/it/test-reactor-ear-nodefaultjvmserver/invoker.properties new file mode 100644 index 00000000..f46ab66f --- /dev/null +++ b/cics-bundle-maven-plugin/src/it/test-reactor-ear-nodefaultjvmserver/invoker.properties @@ -0,0 +1,15 @@ +### +# #%L +# CICS Bundle Maven Plugin +# %% +# Copyright (C) 2019 IBM Corp. +# %% +# This program and the accompanying materials are made +# available under the terms of the Eclipse Public License 2.0 +# which is available at https://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 +# #L% +### +# The expected result of the build, possible values are "success" (default) and "failure" +invoker.buildResult = failure diff --git a/cics-bundle-maven-plugin/src/it/test-reactor-ear-nodefaultjvmserver/pom.xml b/cics-bundle-maven-plugin/src/it/test-reactor-ear-nodefaultjvmserver/pom.xml new file mode 100644 index 00000000..23b6d3c8 --- /dev/null +++ b/cics-bundle-maven-plugin/src/it/test-reactor-ear-nodefaultjvmserver/pom.xml @@ -0,0 +1,50 @@ + + + 4.0.0 + + test-reactor-ear-nodefaultjvmserver + parent + 0.0.1-SNAPSHOT + + pom + + + test-ear + test-bundle + + + + + + + org.apache.maven.plugins + maven-ear-plugin + 3.0.1 + + + org.apache.maven.plugins + maven-war-plugin + 3.2.2 + + + org.apache.maven.plugins + maven-compiler-plugin + 3.8.1 + + + + + + diff --git a/cics-bundle-maven-plugin/src/it/test-reactor-ear-nodefaultjvmserver/postbuild.groovy b/cics-bundle-maven-plugin/src/it/test-reactor-ear-nodefaultjvmserver/postbuild.groovy new file mode 100644 index 00000000..d2fbc2c8 --- /dev/null +++ b/cics-bundle-maven-plugin/src/it/test-reactor-ear-nodefaultjvmserver/postbuild.groovy @@ -0,0 +1,17 @@ +/*- + * #%L + * CICS Bundle Maven Plugin + * %% + * Copyright (C) 2024 IBM Corp. + * %% + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * #L% + */ +File buildLog = new File(basedir, 'build.log') + +assert buildLog.exists() +assert buildLog.text.contains("[ERROR] Failed to execute goal ${pluginString}:build (default-build) on project test-bundle: Bundle part for artifact test-reactor-ear-nodefaultjvmserver:test-ear:ear:0.0.1-SNAPSHOT:compile did not specify a JVM server explicitly, and no default was configured") \ No newline at end of file diff --git a/cics-bundle-maven-plugin/src/it/test-reactor-ear-nodefaultjvmserver/test-bundle/pom.xml b/cics-bundle-maven-plugin/src/it/test-reactor-ear-nodefaultjvmserver/test-bundle/pom.xml new file mode 100644 index 00000000..ab62c06d --- /dev/null +++ b/cics-bundle-maven-plugin/src/it/test-reactor-ear-nodefaultjvmserver/test-bundle/pom.xml @@ -0,0 +1,45 @@ + + + 4.0.0 + + test-reactor-ear-nodefaultjvmserver + parent + 0.0.1-SNAPSHOT + + + test-bundle + cics-bundle + + + + ${project.groupId} + test-ear + ${project.version} + ear + + + + + + + @project.groupId@ + @project.artifactId@ + @project.version@ + true + + + + + diff --git a/cics-bundle-maven-plugin/src/it/test-reactor-ear-nodefaultjvmserver/test-ear/pom.xml b/cics-bundle-maven-plugin/src/it/test-reactor-ear-nodefaultjvmserver/test-ear/pom.xml new file mode 100644 index 00000000..49f13c78 --- /dev/null +++ b/cics-bundle-maven-plugin/src/it/test-reactor-ear-nodefaultjvmserver/test-ear/pom.xml @@ -0,0 +1,55 @@ + + + 4.0.0 + + test-reactor-ear-nodefaultjvmserver + parent + 0.0.1-SNAPSHOT + + + test-ear + ear + + + + + javax.ws.rs + javax.ws.rs-api + 2.0 + provided + + + com.ibm.cics + test-war + 1.0.0 + war + + + + + + + org.apache.maven.plugins + maven-ear-plugin + + false + pom.xml + test-ear + + + + + + diff --git a/cics-bundle-maven-plugin/src/it/test-reactor-osgi-jvmserver/invoker.properties b/cics-bundle-maven-plugin/src/it/test-reactor-osgi-jvmserver/invoker.properties new file mode 100644 index 00000000..5d87ed8c --- /dev/null +++ b/cics-bundle-maven-plugin/src/it/test-reactor-osgi-jvmserver/invoker.properties @@ -0,0 +1,15 @@ +### +# #%L +# CICS Bundle Maven Plugin +# %% +# Copyright (C) 2019 IBM Corp. +# %% +# This program and the accompanying materials are made +# available under the terms of the Eclipse Public License 2.0 +# which is available at https://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 +# #L% +### +# The expected result of the build, possible values are "success" (default) and "failure" +invoker.buildResult = success diff --git a/cics-bundle-maven-plugin/src/it/test-reactor-osgi-jvmserver/pom.xml b/cics-bundle-maven-plugin/src/it/test-reactor-osgi-jvmserver/pom.xml new file mode 100644 index 00000000..8decf3e6 --- /dev/null +++ b/cics-bundle-maven-plugin/src/it/test-reactor-osgi-jvmserver/pom.xml @@ -0,0 +1,46 @@ + + + 4.0.0 + + com.ibm.cics.test-reactor-osgi-jvmserver + parent + 0.0.1-SNAPSHOT + + pom + + + test-osgi + test-bundle + test-tycho + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 3.1.2 + + + org.apache.maven.plugins + maven-compiler-plugin + 3.8.1 + + + + + + diff --git a/cics-bundle-maven-plugin/src/it/test-reactor-osgi-jvmserver/postbuild.bsh b/cics-bundle-maven-plugin/src/it/test-reactor-osgi-jvmserver/postbuild.bsh new file mode 100644 index 00000000..88964fb1 --- /dev/null +++ b/cics-bundle-maven-plugin/src/it/test-reactor-osgi-jvmserver/postbuild.bsh @@ -0,0 +1 @@ +com.ibm.cics.cbmp.PostBuildOsgi.assertOutput(basedir); diff --git a/cics-bundle-maven-plugin/src/it/test-reactor-osgi-jvmserver/test-bundle/pom.xml b/cics-bundle-maven-plugin/src/it/test-reactor-osgi-jvmserver/test-bundle/pom.xml new file mode 100644 index 00000000..1fccb0a5 --- /dev/null +++ b/cics-bundle-maven-plugin/src/it/test-reactor-osgi-jvmserver/test-bundle/pom.xml @@ -0,0 +1,67 @@ + + + 4.0.0 + + com.ibm.cics.test-reactor-osgi-jvmserver + parent + 0.0.1-SNAPSHOT + + + test-bundle + cics-bundle + + + + ${project.groupId} + test-osgi + ${project.version} + jar + + + ${project.groupId} + test-tycho + ${project.version} + jar + + + + + + + @project.groupId@ + @project.artifactId@ + @project.version@ + true + + + + + test-osgi + + EYUCMCIJ + + + + test-tycho + + EYUCMCIJ + + + + + + + + diff --git a/cics-bundle-maven-plugin/src/it/test-reactor-osgi-jvmserver/test-osgi/pom.xml b/cics-bundle-maven-plugin/src/it/test-reactor-osgi-jvmserver/test-osgi/pom.xml new file mode 100644 index 00000000..d1c1771e --- /dev/null +++ b/cics-bundle-maven-plugin/src/it/test-reactor-osgi-jvmserver/test-osgi/pom.xml @@ -0,0 +1,69 @@ + + + 4.0.0 + + com.ibm.cics.test-reactor-osgi-jvmserver + parent + 0.0.1-SNAPSHOT + + + test-osgi + jar + + + + + javax.ws.rs + javax.ws.rs-api + 2.0 + provided + + + + + + + biz.aQute.bnd + bnd-maven-plugin + 4.2.0 + + + + bnd-process + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + ${project.build.outputDirectory}/META-INF/MANIFEST.MF + + + + + maven-compiler-plugin + 3.5.1 + + 1.8 + 1.8 + + + + + + diff --git a/cics-bundle-maven-plugin/src/it/test-reactor-osgi-jvmserver/test-osgi/src/main/java/test_osgi/TestEndpoint.java b/cics-bundle-maven-plugin/src/it/test-reactor-osgi-jvmserver/test-osgi/src/main/java/test_osgi/TestEndpoint.java new file mode 100644 index 00000000..e796674d --- /dev/null +++ b/cics-bundle-maven-plugin/src/it/test-reactor-osgi-jvmserver/test-osgi/src/main/java/test_osgi/TestEndpoint.java @@ -0,0 +1,39 @@ +package test_osgi; + +/*- + * #%L + * CICS Bundle Maven Plugin + * %% + * Copyright (C) 2019 IBM Corp. + * %% + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * #L% + */ + +import java.util.Optional; + +import javax.ws.rs.ApplicationPath; +import javax.ws.rs.GET; +import javax.ws.rs.Path; +import javax.ws.rs.Produces; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.Response; + +@ApplicationPath("") +@Path("") +public class TestEndpoint extends javax.ws.rs.core.Application { + + public TestEndpoint() { + } + + @GET + @Produces(MediaType.APPLICATION_OCTET_STREAM) + public Response get() { + return Response.ok().build(); + } + +} diff --git a/cics-bundle-maven-plugin/src/it/test-reactor-osgi-jvmserver/test-tycho/META-INF/MANIFEST.MF b/cics-bundle-maven-plugin/src/it/test-reactor-osgi-jvmserver/test-tycho/META-INF/MANIFEST.MF new file mode 100644 index 00000000..77a6d806 --- /dev/null +++ b/cics-bundle-maven-plugin/src/it/test-reactor-osgi-jvmserver/test-tycho/META-INF/MANIFEST.MF @@ -0,0 +1,4 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-SymbolicName: test-tycho +Bundle-Version: 0.0.1.qualifier diff --git a/cics-bundle-maven-plugin/src/it/test-reactor-osgi-jvmserver/test-tycho/build.properties b/cics-bundle-maven-plugin/src/it/test-reactor-osgi-jvmserver/test-tycho/build.properties new file mode 100644 index 00000000..7c5a40e0 --- /dev/null +++ b/cics-bundle-maven-plugin/src/it/test-reactor-osgi-jvmserver/test-tycho/build.properties @@ -0,0 +1,15 @@ +### +# #%L +# CICS Bundle Maven Plugin +# %% +# Copyright (C) 2019 IBM Corp. +# %% +# This program and the accompanying materials are made +# available under the terms of the Eclipse Public License 2.0 +# which is available at https://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 +# #L% +### +bin.includes = META-INF/,\ + .,\ diff --git a/cics-bundle-maven-plugin/src/it/test-reactor-osgi-jvmserver/test-tycho/pom.xml b/cics-bundle-maven-plugin/src/it/test-reactor-osgi-jvmserver/test-tycho/pom.xml new file mode 100644 index 00000000..bd575684 --- /dev/null +++ b/cics-bundle-maven-plugin/src/it/test-reactor-osgi-jvmserver/test-tycho/pom.xml @@ -0,0 +1,50 @@ + + + 4.0.0 + + com.ibm.cics.test-reactor-osgi-jvmserver + parent + 0.0.1-SNAPSHOT + + + test-tycho + eclipse-plugin + + + 1.4.0 + + + + + + javax.ws.rs + javax.ws.rs-api + 2.0 + provided + + + + + + + org.eclipse.tycho + tycho-maven-plugin + ${tycho-version} + true + + + + + diff --git a/cics-bundle-maven-plugin/src/it/test-reactor-osgi-jvmserver/test-tycho/src/main/java/test_tycho/TestEndpoint.java b/cics-bundle-maven-plugin/src/it/test-reactor-osgi-jvmserver/test-tycho/src/main/java/test_tycho/TestEndpoint.java new file mode 100644 index 00000000..8f2a9da1 --- /dev/null +++ b/cics-bundle-maven-plugin/src/it/test-reactor-osgi-jvmserver/test-tycho/src/main/java/test_tycho/TestEndpoint.java @@ -0,0 +1,39 @@ +package test_tycho; + +/*- + * #%L + * CICS Bundle Maven Plugin + * %% + * Copyright (C) 2019 IBM Corp. + * %% + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * #L% + */ + +import java.util.Optional; + +import javax.ws.rs.ApplicationPath; +import javax.ws.rs.GET; +import javax.ws.rs.Path; +import javax.ws.rs.Produces; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.Response; + +@ApplicationPath("") +@Path("") +public class TestEndpoint extends javax.ws.rs.core.Application { + + public TestEndpoint() { + } + + @GET + @Produces(MediaType.APPLICATION_OCTET_STREAM) + public Response get() { + return Response.ok().build(); + } + +} diff --git a/cics-bundle-maven-plugin/src/it/test-reactor-osgi-no-defaultjvmserver/invoker.properties b/cics-bundle-maven-plugin/src/it/test-reactor-osgi-no-defaultjvmserver/invoker.properties new file mode 100644 index 00000000..f46ab66f --- /dev/null +++ b/cics-bundle-maven-plugin/src/it/test-reactor-osgi-no-defaultjvmserver/invoker.properties @@ -0,0 +1,15 @@ +### +# #%L +# CICS Bundle Maven Plugin +# %% +# Copyright (C) 2019 IBM Corp. +# %% +# This program and the accompanying materials are made +# available under the terms of the Eclipse Public License 2.0 +# which is available at https://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 +# #L% +### +# The expected result of the build, possible values are "success" (default) and "failure" +invoker.buildResult = failure diff --git a/cics-bundle-maven-plugin/src/it/test-reactor-osgi-no-defaultjvmserver/pom.xml b/cics-bundle-maven-plugin/src/it/test-reactor-osgi-no-defaultjvmserver/pom.xml new file mode 100644 index 00000000..627c8264 --- /dev/null +++ b/cics-bundle-maven-plugin/src/it/test-reactor-osgi-no-defaultjvmserver/pom.xml @@ -0,0 +1,45 @@ + + + 4.0.0 + + com.ibm.cics.test-reactor-osgi-nodefaultjvmserver + parent + 0.0.1-SNAPSHOT + + pom + + + test-osgi + test-bundle + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 3.1.2 + + + org.apache.maven.plugins + maven-compiler-plugin + 3.8.1 + + + + + + diff --git a/cics-bundle-maven-plugin/src/it/test-reactor-osgi-no-defaultjvmserver/postbuild.groovy b/cics-bundle-maven-plugin/src/it/test-reactor-osgi-no-defaultjvmserver/postbuild.groovy new file mode 100644 index 00000000..7520eca1 --- /dev/null +++ b/cics-bundle-maven-plugin/src/it/test-reactor-osgi-no-defaultjvmserver/postbuild.groovy @@ -0,0 +1,17 @@ +/*- + * #%L + * CICS Bundle Maven Plugin + * %% + * Copyright (C) 2024 IBM Corp. + * %% + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * #L% + */ +File buildLog = new File(basedir, 'build.log') + +assert buildLog.exists() +assert buildLog.text.contains("[ERROR] Failed to execute goal ${pluginString}:build (default-build) on project test-bundle: Bundle part for artifact com.ibm.cics.test-reactor-osgi-nodefaultjvmserver:test-osgi:jar:0.0.1-SNAPSHOT:compile did not specify a JVM server explicitly, and no default was configured") \ No newline at end of file diff --git a/cics-bundle-maven-plugin/src/it/test-reactor-osgi-no-defaultjvmserver/test-bundle/pom.xml b/cics-bundle-maven-plugin/src/it/test-reactor-osgi-no-defaultjvmserver/test-bundle/pom.xml new file mode 100644 index 00000000..8cc7b269 --- /dev/null +++ b/cics-bundle-maven-plugin/src/it/test-reactor-osgi-no-defaultjvmserver/test-bundle/pom.xml @@ -0,0 +1,45 @@ + + + 4.0.0 + + com.ibm.cics.test-reactor-osgi-nodefaultjvmserver + parent + 0.0.1-SNAPSHOT + + + test-bundle + cics-bundle + + + + ${project.groupId} + test-osgi + ${project.version} + jar + + + + + + + @project.groupId@ + @project.artifactId@ + @project.version@ + true + + + + + diff --git a/cics-bundle-maven-plugin/src/it/test-reactor-osgi-no-defaultjvmserver/test-osgi/pom.xml b/cics-bundle-maven-plugin/src/it/test-reactor-osgi-no-defaultjvmserver/test-osgi/pom.xml new file mode 100644 index 00000000..0c2e67a6 --- /dev/null +++ b/cics-bundle-maven-plugin/src/it/test-reactor-osgi-no-defaultjvmserver/test-osgi/pom.xml @@ -0,0 +1,69 @@ + + + 4.0.0 + + com.ibm.cics.test-reactor-osgi-nodefaultjvmserver + parent + 0.0.1-SNAPSHOT + + + test-osgi + jar + + + + + javax.ws.rs + javax.ws.rs-api + 2.0 + provided + + + + + + + biz.aQute.bnd + bnd-maven-plugin + 4.2.0 + + + + bnd-process + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + ${project.build.outputDirectory}/META-INF/MANIFEST.MF + + + + + maven-compiler-plugin + 3.5.1 + + 1.8 + 1.8 + + + + + + diff --git a/cics-bundle-maven-plugin/src/it/test-reactor-osgi-no-defaultjvmserver/test-osgi/src/main/java/test_osgi/TestEndpoint.java b/cics-bundle-maven-plugin/src/it/test-reactor-osgi-no-defaultjvmserver/test-osgi/src/main/java/test_osgi/TestEndpoint.java new file mode 100644 index 00000000..e796674d --- /dev/null +++ b/cics-bundle-maven-plugin/src/it/test-reactor-osgi-no-defaultjvmserver/test-osgi/src/main/java/test_osgi/TestEndpoint.java @@ -0,0 +1,39 @@ +package test_osgi; + +/*- + * #%L + * CICS Bundle Maven Plugin + * %% + * Copyright (C) 2019 IBM Corp. + * %% + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * #L% + */ + +import java.util.Optional; + +import javax.ws.rs.ApplicationPath; +import javax.ws.rs.GET; +import javax.ws.rs.Path; +import javax.ws.rs.Produces; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.Response; + +@ApplicationPath("") +@Path("") +public class TestEndpoint extends javax.ws.rs.core.Application { + + public TestEndpoint() { + } + + @GET + @Produces(MediaType.APPLICATION_OCTET_STREAM) + public Response get() { + return Response.ok().build(); + } + +} diff --git a/cics-bundle-maven-plugin/src/it/test-reactor-war-deploy/postbuild.bsh b/cics-bundle-maven-plugin/src/it/test-reactor-war-deploy/postbuild.bsh index edc00844..c0bba9b4 100644 --- a/cics-bundle-maven-plugin/src/it/test-reactor-war-deploy/postbuild.bsh +++ b/cics-bundle-maven-plugin/src/it/test-reactor-war-deploy/postbuild.bsh @@ -1,2 +1,2 @@ -com.ibm.cics.cbmp.PostBuildWar.assertOutput(basedir); +com.ibm.cics.cbmp.PostBuildWar.assertOutput(new File(basedir, "test-bundle")); context.get("wireMockServer").shutdownServer(); diff --git a/cics-bundle-maven-plugin/src/it/test-reactor-war-jvmserver/pom.xml b/cics-bundle-maven-plugin/src/it/test-reactor-war-jvmserver/pom.xml new file mode 100644 index 00000000..eb4231a3 --- /dev/null +++ b/cics-bundle-maven-plugin/src/it/test-reactor-war-jvmserver/pom.xml @@ -0,0 +1,52 @@ + + + 4.0.0 + + test-reactor-war-jvmserver + test-bundle + 0.0.1-SNAPSHOT + cics-bundle + + + + com.ibm.cics + test-war + 1.0.0 + war + + + + + + + @project.groupId@ + @project.artifactId@ + @project.version@ + true + + + + + test-war + + EYUCMCIJ + + + + + + + + diff --git a/cics-bundle-maven-plugin/src/it/test-reactor-war-jvmserver/postbuild.bsh b/cics-bundle-maven-plugin/src/it/test-reactor-war-jvmserver/postbuild.bsh new file mode 100644 index 00000000..2a8eae73 --- /dev/null +++ b/cics-bundle-maven-plugin/src/it/test-reactor-war-jvmserver/postbuild.bsh @@ -0,0 +1 @@ +com.ibm.cics.cbmp.PostBuildWar.assertOutput(basedir); diff --git a/cics-bundle-maven-plugin/src/it/test-reactor-war-nodefaultjvmserver/invoker.properties b/cics-bundle-maven-plugin/src/it/test-reactor-war-nodefaultjvmserver/invoker.properties new file mode 100644 index 00000000..f46ab66f --- /dev/null +++ b/cics-bundle-maven-plugin/src/it/test-reactor-war-nodefaultjvmserver/invoker.properties @@ -0,0 +1,15 @@ +### +# #%L +# CICS Bundle Maven Plugin +# %% +# Copyright (C) 2019 IBM Corp. +# %% +# This program and the accompanying materials are made +# available under the terms of the Eclipse Public License 2.0 +# which is available at https://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 +# #L% +### +# The expected result of the build, possible values are "success" (default) and "failure" +invoker.buildResult = failure diff --git a/cics-bundle-maven-plugin/src/it/test-reactor-war-nodefaultjvmserver/pom.xml b/cics-bundle-maven-plugin/src/it/test-reactor-war-nodefaultjvmserver/pom.xml new file mode 100644 index 00000000..940be622 --- /dev/null +++ b/cics-bundle-maven-plugin/src/it/test-reactor-war-nodefaultjvmserver/pom.xml @@ -0,0 +1,42 @@ + + + 4.0.0 + + test-reactor-war-nodefaultjvmserver + test-bundle + 0.0.1-SNAPSHOT + cics-bundle + + + + com.ibm.cics + test-war + 1.0.0 + war + + + + + + + @project.groupId@ + @project.artifactId@ + @project.version@ + true + + + + + diff --git a/cics-bundle-maven-plugin/src/it/test-reactor-war-nodefaultjvmserver/postbuild.groovy b/cics-bundle-maven-plugin/src/it/test-reactor-war-nodefaultjvmserver/postbuild.groovy new file mode 100644 index 00000000..ee12c0f0 --- /dev/null +++ b/cics-bundle-maven-plugin/src/it/test-reactor-war-nodefaultjvmserver/postbuild.groovy @@ -0,0 +1,17 @@ +/*- + * #%L + * CICS Bundle Maven Plugin + * %% + * Copyright (C) 2024 IBM Corp. + * %% + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * #L% + */ +File buildLog = new File(basedir, 'build.log') + +assert buildLog.exists() +assert buildLog.text.contains("[ERROR] Failed to execute goal ${pluginString}:build (default-build) on project test-bundle: Bundle part for artifact com.ibm.cics:test-war:war:1.0.0:compile did not specify a JVM server explicitly, and no default was configured") \ No newline at end of file diff --git a/cics-bundle-maven-plugin/src/it/test-reactor-war/postbuild.bsh b/cics-bundle-maven-plugin/src/it/test-reactor-war/postbuild.bsh index 2a8eae73..4864943a 100644 --- a/cics-bundle-maven-plugin/src/it/test-reactor-war/postbuild.bsh +++ b/cics-bundle-maven-plugin/src/it/test-reactor-war/postbuild.bsh @@ -1 +1 @@ -com.ibm.cics.cbmp.PostBuildWar.assertOutput(basedir); +com.ibm.cics.cbmp.PostBuildWar.assertOutput(new File(basedir, "test-bundle")); diff --git a/cics-bundle-maven-plugin/src/main/java/com/ibm/cics/cbmp/AbstractAutoConfigureBundlePublisherMojo.java b/cics-bundle-maven-plugin/src/main/java/com/ibm/cics/cbmp/AbstractAutoConfigureBundlePublisherMojo.java index f2d39cc5..1e21f31c 100644 --- a/cics-bundle-maven-plugin/src/main/java/com/ibm/cics/cbmp/AbstractAutoConfigureBundlePublisherMojo.java +++ b/cics-bundle-maven-plugin/src/main/java/com/ibm/cics/cbmp/AbstractAutoConfigureBundlePublisherMojo.java @@ -37,7 +37,7 @@ public abstract class AbstractAutoConfigureBundlePublisherMojo extends AbstractB /** * The default fallback value for the CICS JVM server that will be used for any Java-based artifacts that don't have a JVM server specified. */ - @Parameter(property="cicsbundle.defaultjvmserver", defaultValue = "MYJVMS", required = false, readonly = false) + @Parameter(property="cicsbundle.defaultjvmserver", required = false, readonly = false) private String defaultjvmserver; @Parameter(defaultValue = "${project.build.directory}/${project.artifactId}-${project.version}", required = true, readonly = true) diff --git a/cics-bundle-maven-plugin/src/test/java/com/ibm/cics/cbmp/PostBuildTestBundleOSGiVersionRange.java b/cics-bundle-maven-plugin/src/test/java/com/ibm/cics/cbmp/PostBuildTestBundleOSGiVersionRange.java index 69b5a0bb..bc2d0b76 100644 --- a/cics-bundle-maven-plugin/src/test/java/com/ibm/cics/cbmp/PostBuildTestBundleOSGiVersionRange.java +++ b/cics-bundle-maven-plugin/src/test/java/com/ibm/cics/cbmp/PostBuildTestBundleOSGiVersionRange.java @@ -45,7 +45,7 @@ static void assertOutput(File root) throws Exception { is, CompareMatcher.isIdenticalTo( "\n" + - "" + "" ).withDifferenceEvaluator( DifferenceEvaluators.chain( DifferenceEvaluators.Default, diff --git a/cics-bundle-maven-plugin/src/test/java/com/ibm/cics/cbmp/PostBuildWar.java b/cics-bundle-maven-plugin/src/test/java/com/ibm/cics/cbmp/PostBuildWar.java index e23a1cd9..58a24363 100644 --- a/cics-bundle-maven-plugin/src/test/java/com/ibm/cics/cbmp/PostBuildWar.java +++ b/cics-bundle-maven-plugin/src/test/java/com/ibm/cics/cbmp/PostBuildWar.java @@ -30,7 +30,7 @@ public class PostBuildWar { private static final String WAR_BUNDLE = BASE_NAME + ".war"; static void assertOutput(File root) throws Exception { - Path cicsBundle = root.toPath().resolve("test-bundle/target/test-bundle-0.0.1-SNAPSHOT.zip"); + Path cicsBundle = root.toPath().resolve("target/test-bundle-0.0.1-SNAPSHOT.zip"); assertBundleContents( cicsBundle,