diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 53f2a22b9..51cc25f06 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -22,13 +22,13 @@ jobs: matrix: # test against latest update of each major Java version, as well as specific updates of LTS versions: RUNTIME: [ol, wlp] - RUNTIME_VERSION: [22.0.0.12, 23.0.0.3] + RUNTIME_VERSION: [23.0.0.6, 23.0.0.3] java: [17, 11, 8] exclude: - java: 8 - RUNTIME_VERSION: 22.0.0.12 + RUNTIME_VERSION: 23.0.0.3 - java: 17 - RUNTIME_VERSION: 22.0.0.12 + RUNTIME_VERSION: 23.0.0.3 name: ${{ matrix.RUNTIME }} ${{ matrix.RUNTIME_VERSION }}, Java ${{ matrix.java }}, Linux steps: # Checkout repos @@ -51,6 +51,10 @@ jobs: with: repository: OpenLiberty/ci.ant path: ci.ant + - name: Set up Maven + uses: stCarolas/setup-maven@v4.5 + with: + maven-version: 3.9.2 - name: Cache maven packages uses: actions/cache@v3 with: @@ -60,14 +64,11 @@ jobs: # Install dependencies - name: Install ci.ant and ci.common run: | - cd ./ci.ant - mvn clean install --batch-mode --no-transfer-progress --errors -DtrimStackTrace=false - cd ../ci.common - mvn clean install --batch-mode --no-transfer-progress --errors -DtrimStackTrace=false - cd .. + ./mvnw -V clean install -f ci.ant --batch-mode --no-transfer-progress --errors -DtrimStackTrace=false + ./mvnw -V clean install -f ci.common --batch-mode --no-transfer-progress --errors -DtrimStackTrace=false # Run tests - name: Run tests - run: ./mvnw verify --batch-mode --no-transfer-progress --errors -DtrimStackTrace=false -Ponline-its -D"invoker.streamLogs"=true -Druntime=${{ matrix.RUNTIME }} -DruntimeVersion="${{ matrix.RUNTIME_VERSION }}" + run: ./mvnw -V verify --batch-mode --no-transfer-progress --errors -DtrimStackTrace=false -Ponline-its -D"invoker.streamLogs"=true -Druntime=${{ matrix.RUNTIME }} -DruntimeVersion="${{ matrix.RUNTIME_VERSION }}" # WINDOWS BUILD build-windows: @@ -77,13 +78,13 @@ jobs: matrix: # test against latest update of each major Java version, as well as specific updates of LTS versions: RUNTIME: [ol, wlp] - RUNTIME_VERSION: [22.0.0.12, 23.0.0.3] + RUNTIME_VERSION: [23.0.0.6, 23.0.0.3] java: [17, 11, 8] exclude: - java: 8 - RUNTIME_VERSION: 22.0.0.12 + RUNTIME_VERSION: 23.0.0.3 - java: 17 - RUNTIME_VERSION: 22.0.0.12 + RUNTIME_VERSION: 23.0.0.3 name: ${{ matrix.RUNTIME }} ${{ matrix.RUNTIME_VERSION }}, Java ${{ matrix.java }}, Windows steps: # Checkout repos @@ -107,14 +108,19 @@ jobs: path: ~/.m2 key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} restore-keys: ${{ runner.os }}-m2 - # Install dependencies - - name: Install ci.ant and ci.common - run: | - cd C:/ci.ant - mvn clean install --batch-mode --no-transfer-progress --errors -DtrimStackTrace=false - cd C:/ci.common - mvn clean install --batch-mode --no-transfer-progress --errors -DtrimStackTrace=false + - name: Set up Maven + uses: stCarolas/setup-maven@v4.5 + with: + maven-version: 3.9.2 + # Install ci.ant + - name: Install ci.ant + working-directory: C:/ci.ant + run: .\mvnw.cmd -V clean install --batch-mode --no-transfer-progress --errors -DtrimStackTrace=false + # Install ci.common + - name: Install ci.common + working-directory: C:/ci.common + run: .\mvnw.cmd -V clean install --batch-mode --no-transfer-progress --errors -DtrimStackTrace=false # Run tests - name: Run tests working-directory: C:/ci.maven - run: .\mvnw.cmd verify -Ponline-its --batch-mode --no-transfer-progress --errors -DtrimStackTrace=false -D"invoker.streamLogs"=true -Druntime=${{ matrix.RUNTIME }} -DruntimeVersion="${{ matrix.RUNTIME_VERSION }}" + run: .\mvnw.cmd -V verify -Ponline-its --batch-mode --no-transfer-progress --errors -DtrimStackTrace=false -D"invoker.streamLogs"=true -Druntime=${{ matrix.RUNTIME }} -DruntimeVersion="${{ matrix.RUNTIME_VERSION }}" diff --git a/.mvn/wrapper/maven-wrapper.properties b/.mvn/wrapper/maven-wrapper.properties index ca5ab4bab..3c6fda8c6 100644 --- a/.mvn/wrapper/maven-wrapper.properties +++ b/.mvn/wrapper/maven-wrapper.properties @@ -6,7 +6,7 @@ # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # -# https://www.apache.org/licenses/LICENSE-2.0 +# http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an @@ -14,5 +14,5 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. -distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.7/apache-maven-3.8.7-bin.zip -wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.2/apache-maven-3.9.2-bin.zip +wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar diff --git a/README.md b/README.md index 0ad81e2c3..d4eea4e13 100644 --- a/README.md +++ b/README.md @@ -55,7 +55,7 @@ To enable Liberty Maven Plugin in your project add the following to your `pom.xm io.openliberty.tools liberty-maven-plugin - 3.7.1 + 3.8.1 ... @@ -104,7 +104,7 @@ Example using the `runtimeArtifact` parameter to install a WebSphere Liberty run io.openliberty.tools liberty-maven-plugin - 3.7.1 + 3.8.1 com.ibm.websphere.appserver.runtime @@ -124,7 +124,7 @@ Example using the `runtimeArtifact` parameter to install an Open Liberty beta ru io.openliberty.tools liberty-maven-plugin - 3.7.1 + 3.8.1 io.openliberty.beta @@ -238,7 +238,7 @@ Example: io.openliberty.tools liberty-maven-plugin - [3.2.3,) + [3.8.1,) true /opt/ibm/wlp diff --git a/docs/common-server-parameters.md b/docs/common-server-parameters.md index e3de81402..454403c96 100644 --- a/docs/common-server-parameters.md +++ b/docs/common-server-parameters.md @@ -170,3 +170,9 @@ Example of Liberty configuration with parameters: ``` + +#### Late property replacement + +Maven does property replacement for `${...}` values in pom.xml before any plugin is run. Starting with the 3.8.3 release of the liberty-maven-plugin, an alternate syntax `@{...}` is supported which allows late replacement of properties when the plugin is executed. This enables properties that are modified by other plugins to be picked up correctly. + +The alternate syntax is supported for Liberty configuration specified by Maven properties, as well as the `jvmOptions` and `bootstrapProperties` parameters. diff --git a/liberty-maven-app-parent/pom.xml b/liberty-maven-app-parent/pom.xml index 22fd2521e..84517cb77 100644 --- a/liberty-maven-app-parent/pom.xml +++ b/liberty-maven-app-parent/pom.xml @@ -20,7 +20,7 @@ io.openliberty.tools liberty-maven - 3.9-SNAPSHOT + 3.8.3-SNAPSHOT liberty-maven-app-parent @@ -44,7 +44,7 @@ io.openliberty.tools liberty-maven-plugin - 3.9-SNAPSHOT + 3.8.3-SNAPSHOT stop-before-clean diff --git a/liberty-maven-plugin/pom.xml b/liberty-maven-plugin/pom.xml index e2dfb2247..41d69972f 100644 --- a/liberty-maven-plugin/pom.xml +++ b/liberty-maven-plugin/pom.xml @@ -6,7 +6,7 @@ io.openliberty.tools liberty-maven - 3.9-SNAPSHOT + 3.8.3-SNAPSHOT liberty-maven-plugin @@ -14,6 +14,10 @@ liberty-maven-plugin Liberty Maven Plugin : Install, Start/Stop, Package, Create Server, Deploy/Undeploy applications + + ${maven.version} + + @@ -33,7 +37,13 @@ io.openliberty.tools liberty-ant-tasks - 1.9.12 + 1.9.13-SNAPSHOT + + + org.apache.maven + maven-artifact + ${maven.version} + provided org.apache.maven @@ -41,6 +51,18 @@ ${maven.version} provided + + org.apache.maven + maven-model + ${maven.version} + provided + + + org.apache.maven + maven-plugin-api + ${maven.version} + provided + org.apache.maven.shared maven-mapping @@ -50,23 +72,23 @@ org.apache.maven.plugin-tools maven-plugin-annotations - 3.8.1 + ${maven.plugin.tools.version} provided org.codehaus.plexus plexus-utils - 3.4.2 + 3.5.1 - org.sonatype.plexus + org.codehaus.plexus plexus-build-api - 0.0.7 + 1.2.0 io.openliberty.tools ci.common - 1.8.25-SNAPSHOT + 1.8.27-SNAPSHOT org.twdata.maven @@ -85,16 +107,13 @@ org.apache.maven.plugins maven-plugin-plugin - 3.6.0 + ${maven.plugin.tools.version} help-goal helpmojo - - true - @@ -109,7 +128,6 @@ org.apache.maven.plugins maven-invoker-plugin - 3.3.0 false @@ -145,7 +163,6 @@ org.apache.maven.plugins maven-invoker-plugin - 3.3.0 false @@ -334,8 +351,4 @@ - - - 3.0 - diff --git a/liberty-maven-plugin/src/it/alt-outputdir-it/pom.xml b/liberty-maven-plugin/src/it/alt-outputdir-it/pom.xml index b68115214..894d242b4 100644 --- a/liberty-maven-plugin/src/it/alt-outputdir-it/pom.xml +++ b/liberty-maven-plugin/src/it/alt-outputdir-it/pom.xml @@ -50,7 +50,7 @@ org.apache.maven.plugins maven-war-plugin - 3.3.2 + 3.4.0 false pom.xml diff --git a/liberty-maven-plugin/src/it/appsdirectory-apps-configured-bootstraps-default-it/pom.xml b/liberty-maven-plugin/src/it/appsdirectory-apps-configured-bootstraps-default-it/pom.xml index 43d543c30..8134a50e1 100644 --- a/liberty-maven-plugin/src/it/appsdirectory-apps-configured-bootstraps-default-it/pom.xml +++ b/liberty-maven-plugin/src/it/appsdirectory-apps-configured-bootstraps-default-it/pom.xml @@ -51,17 +51,17 @@ org.apache.maven.plugins maven-war-plugin - 3.3.2 + 3.4.0 org.apache.maven.plugins maven-failsafe-plugin - 2.5 + 3.1.2 org.apache.maven.plugins maven-surefire-plugin - 2.5 + 3.1.2 @@ -122,6 +122,7 @@ true true false + false diff --git a/liberty-maven-plugin/src/it/appsdirectory-apps-configured-bootstraps-default-recursive-it/pom.xml b/liberty-maven-plugin/src/it/appsdirectory-apps-configured-bootstraps-default-recursive-it/pom.xml index 49847274d..1dbb44044 100644 --- a/liberty-maven-plugin/src/it/appsdirectory-apps-configured-bootstraps-default-recursive-it/pom.xml +++ b/liberty-maven-plugin/src/it/appsdirectory-apps-configured-bootstraps-default-recursive-it/pom.xml @@ -45,17 +45,17 @@ org.apache.maven.plugins maven-war-plugin - 3.3.2 + 3.4.0 org.apache.maven.plugins maven-failsafe-plugin - 2.5 + 3.1.2 org.apache.maven.plugins maven-surefire-plugin - 2.5 + 3.1.2 @@ -115,6 +115,7 @@ true true false + false diff --git a/liberty-maven-plugin/src/it/appsdirectory-apps-configured-bootstraps-it/pom.xml b/liberty-maven-plugin/src/it/appsdirectory-apps-configured-bootstraps-it/pom.xml index b19fc15ef..f05dabe22 100644 --- a/liberty-maven-plugin/src/it/appsdirectory-apps-configured-bootstraps-it/pom.xml +++ b/liberty-maven-plugin/src/it/appsdirectory-apps-configured-bootstraps-it/pom.xml @@ -45,17 +45,17 @@ org.apache.maven.plugins maven-war-plugin - 3.3.2 + 3.4.0 org.apache.maven.plugins maven-failsafe-plugin - 2.5 + 3.1.2 org.apache.maven.plugins maven-surefire-plugin - 2.5 + 3.1.2 @@ -124,6 +124,7 @@ true true false + false diff --git a/liberty-maven-plugin/src/it/appsdirectory-apps-configured-it/pom.xml b/liberty-maven-plugin/src/it/appsdirectory-apps-configured-it/pom.xml index 5189558f7..556453ab9 100644 --- a/liberty-maven-plugin/src/it/appsdirectory-apps-configured-it/pom.xml +++ b/liberty-maven-plugin/src/it/appsdirectory-apps-configured-it/pom.xml @@ -39,17 +39,17 @@ org.apache.maven.plugins maven-war-plugin - 3.3.2 + 3.4.0 org.apache.maven.plugins maven-failsafe-plugin - 2.5 + 3.1.2 org.apache.maven.plugins maven-surefire-plugin - 2.5 + 3.1.2 @@ -139,6 +139,7 @@ true true false + false diff --git a/liberty-maven-plugin/src/it/appsdirectory-apps-configured-variables-include-it/pom.xml b/liberty-maven-plugin/src/it/appsdirectory-apps-configured-variables-include-it/pom.xml index 146cc7fa6..4b1ebd363 100644 --- a/liberty-maven-plugin/src/it/appsdirectory-apps-configured-variables-include-it/pom.xml +++ b/liberty-maven-plugin/src/it/appsdirectory-apps-configured-variables-include-it/pom.xml @@ -44,22 +44,22 @@ org.apache.maven.plugins maven-war-plugin - 3.3.2 + 3.4.0 org.apache.maven.plugins maven-failsafe-plugin - 2.5 + 3.1.2 org.apache.maven.plugins maven-surefire-plugin - 2.5 + 3.1.2 org.apache.felix maven-bundle-plugin - 2.3.7 + 5.1.9 @@ -147,6 +147,7 @@ false false false + false @@ -154,7 +155,7 @@ org.apache.maven.plugins maven-resources-plugin - 3.2.0 + 3.3.1 default-cli diff --git a/liberty-maven-plugin/src/it/appsdirectory-apps-configured-variables-include-looseapp-it/pom.xml b/liberty-maven-plugin/src/it/appsdirectory-apps-configured-variables-include-looseapp-it/pom.xml index fe10cadb0..b9a30fe19 100644 --- a/liberty-maven-plugin/src/it/appsdirectory-apps-configured-variables-include-looseapp-it/pom.xml +++ b/liberty-maven-plugin/src/it/appsdirectory-apps-configured-variables-include-looseapp-it/pom.xml @@ -44,22 +44,22 @@ org.apache.maven.plugins maven-war-plugin - 3.3.2 + 3.4.0 org.apache.maven.plugins maven-failsafe-plugin - 2.5 + 3.1.2 org.apache.maven.plugins maven-surefire-plugin - 2.5 + 3.1.2 org.apache.felix maven-bundle-plugin - 2.3.7 + 5.1.9 @@ -147,6 +147,7 @@ false false false + false @@ -154,7 +155,7 @@ org.apache.maven.plugins maven-resources-plugin - 3.2.0 + 3.3.1 default-cli diff --git a/liberty-maven-plugin/src/it/appsdirectory-apps-configured-variables-it/pom.xml b/liberty-maven-plugin/src/it/appsdirectory-apps-configured-variables-it/pom.xml index 2eedf9955..d1485259b 100644 --- a/liberty-maven-plugin/src/it/appsdirectory-apps-configured-variables-it/pom.xml +++ b/liberty-maven-plugin/src/it/appsdirectory-apps-configured-variables-it/pom.xml @@ -45,17 +45,17 @@ org.apache.maven.plugins maven-war-plugin - 3.3.2 + 3.4.0 org.apache.maven.plugins maven-failsafe-plugin - 2.5 + 3.1.2 org.apache.maven.plugins maven-surefire-plugin - 2.5 + 3.1.2 @@ -120,6 +120,7 @@ true true false + false diff --git a/liberty-maven-plugin/src/it/appsdirectory-apps-dependency-notconfigured-it/pom.xml b/liberty-maven-plugin/src/it/appsdirectory-apps-dependency-notconfigured-it/pom.xml index eb6c98c3e..4705a1c9d 100644 --- a/liberty-maven-plugin/src/it/appsdirectory-apps-dependency-notconfigured-it/pom.xml +++ b/liberty-maven-plugin/src/it/appsdirectory-apps-dependency-notconfigured-it/pom.xml @@ -45,17 +45,17 @@ org.apache.maven.plugins maven-war-plugin - 3.3.2 + 3.4.0 org.apache.maven.plugins maven-failsafe-plugin - 2.5 + 3.1.2 org.apache.maven.plugins maven-surefire-plugin - 2.5 + 3.1.2 @@ -123,6 +123,7 @@ true true false + false diff --git a/liberty-maven-plugin/src/it/appsdirectory-apps-notconfigured-dependency-configured-it/pom.xml b/liberty-maven-plugin/src/it/appsdirectory-apps-notconfigured-dependency-configured-it/pom.xml index 2e3d9a537..a9c366e7d 100644 --- a/liberty-maven-plugin/src/it/appsdirectory-apps-notconfigured-dependency-configured-it/pom.xml +++ b/liberty-maven-plugin/src/it/appsdirectory-apps-notconfigured-dependency-configured-it/pom.xml @@ -45,17 +45,17 @@ org.apache.maven.plugins maven-war-plugin - 3.3.2 + 3.4.0 org.apache.maven.plugins maven-failsafe-plugin - 2.5 + 3.1.2 org.apache.maven.plugins maven-surefire-plugin - 2.5 + 3.1.2 @@ -123,6 +123,7 @@ true true false + false diff --git a/liberty-maven-plugin/src/it/appsdirectory-apps-notconfigured-it/pom.xml b/liberty-maven-plugin/src/it/appsdirectory-apps-notconfigured-it/pom.xml index 46871d454..88a91c1f7 100644 --- a/liberty-maven-plugin/src/it/appsdirectory-apps-notconfigured-it/pom.xml +++ b/liberty-maven-plugin/src/it/appsdirectory-apps-notconfigured-it/pom.xml @@ -39,17 +39,17 @@ org.apache.maven.plugins maven-war-plugin - 3.3.2 + 3.4.0 org.apache.maven.plugins maven-failsafe-plugin - 2.5 + 3.1.2 org.apache.maven.plugins maven-surefire-plugin - 2.5 + 3.1.2 @@ -117,6 +117,7 @@ true true false + false diff --git a/liberty-maven-plugin/src/it/appsdirectory-configdropins-it/pom.xml b/liberty-maven-plugin/src/it/appsdirectory-configdropins-it/pom.xml index d6bc46c9d..663669005 100644 --- a/liberty-maven-plugin/src/it/appsdirectory-configdropins-it/pom.xml +++ b/liberty-maven-plugin/src/it/appsdirectory-configdropins-it/pom.xml @@ -39,17 +39,17 @@ org.apache.maven.plugins maven-war-plugin - 3.3.2 + 3.4.0 org.apache.maven.plugins maven-failsafe-plugin - 2.5 + 3.1.2 org.apache.maven.plugins maven-surefire-plugin - 2.5 + 3.1.2 @@ -113,6 +113,7 @@ true true false + false diff --git a/liberty-maven-plugin/src/it/appsdirectory-dropins-notconfigured-it/pom.xml b/liberty-maven-plugin/src/it/appsdirectory-dropins-notconfigured-it/pom.xml index 06f50a489..55fcdc7af 100644 --- a/liberty-maven-plugin/src/it/appsdirectory-dropins-notconfigured-it/pom.xml +++ b/liberty-maven-plugin/src/it/appsdirectory-dropins-notconfigured-it/pom.xml @@ -39,17 +39,17 @@ org.apache.maven.plugins maven-war-plugin - 3.3.2 + 3.4.0 org.apache.maven.plugins maven-failsafe-plugin - 2.5 + 3.1.2 org.apache.maven.plugins maven-surefire-plugin - 2.5 + 3.1.2 @@ -139,6 +139,7 @@ true true false + false diff --git a/liberty-maven-plugin/src/it/appsdirectory-include-configured-it/pom.xml b/liberty-maven-plugin/src/it/appsdirectory-include-configured-it/pom.xml index b7d98f7e0..c752b5b42 100644 --- a/liberty-maven-plugin/src/it/appsdirectory-include-configured-it/pom.xml +++ b/liberty-maven-plugin/src/it/appsdirectory-include-configured-it/pom.xml @@ -39,17 +39,17 @@ org.apache.maven.plugins maven-war-plugin - 3.3.2 + 3.4.0 org.apache.maven.plugins maven-failsafe-plugin - 2.5 + 3.1.2 org.apache.maven.plugins maven-surefire-plugin - 2.5 + 3.1.2 @@ -113,6 +113,7 @@ true true false + false diff --git a/liberty-maven-plugin/src/it/appsdirectory-notset-configured-it/pom.xml b/liberty-maven-plugin/src/it/appsdirectory-notset-configured-it/pom.xml index 2cde52142..92b6d981c 100644 --- a/liberty-maven-plugin/src/it/appsdirectory-notset-configured-it/pom.xml +++ b/liberty-maven-plugin/src/it/appsdirectory-notset-configured-it/pom.xml @@ -45,17 +45,17 @@ org.apache.maven.plugins maven-war-plugin - 3.3.2 + 3.4.0 org.apache.maven.plugins maven-failsafe-plugin - 2.5 + 3.1.2 org.apache.maven.plugins maven-surefire-plugin - 2.5 + 3.1.2 @@ -139,6 +139,7 @@ true true false + false diff --git a/liberty-maven-plugin/src/it/appsdirectory-notset-notconfigured-it/pom.xml b/liberty-maven-plugin/src/it/appsdirectory-notset-notconfigured-it/pom.xml index c3463143b..7626949c3 100644 --- a/liberty-maven-plugin/src/it/appsdirectory-notset-notconfigured-it/pom.xml +++ b/liberty-maven-plugin/src/it/appsdirectory-notset-notconfigured-it/pom.xml @@ -49,17 +49,17 @@ org.apache.maven.plugins maven-war-plugin - 3.3.2 + 3.4.0 org.apache.maven.plugins maven-failsafe-plugin - 2.5 + 3.1.2 org.apache.maven.plugins maven-surefire-plugin - 2.5 + 3.1.2 @@ -170,6 +170,7 @@ true true false + false diff --git a/liberty-maven-plugin/src/it/appsdirectory-set-appz-notconfigured-it/pom.xml b/liberty-maven-plugin/src/it/appsdirectory-set-appz-notconfigured-it/pom.xml index e02e76ba0..42bb123b7 100644 --- a/liberty-maven-plugin/src/it/appsdirectory-set-appz-notconfigured-it/pom.xml +++ b/liberty-maven-plugin/src/it/appsdirectory-set-appz-notconfigured-it/pom.xml @@ -38,7 +38,7 @@ org.apache.maven.plugins maven-war-plugin - 3.2.2 + 3.4.0 false @@ -91,6 +91,7 @@ false + false @@ -98,7 +99,7 @@ org.apache.maven.plugins maven-failsafe-plugin - 2.22.0 + 3.1.2 integration-test diff --git a/liberty-maven-plugin/src/it/arquillian-tests/pom.xml b/liberty-maven-plugin/src/it/arquillian-tests/pom.xml index f2659d636..8643266a5 100644 --- a/liberty-maven-plugin/src/it/arquillian-tests/pom.xml +++ b/liberty-maven-plugin/src/it/arquillian-tests/pom.xml @@ -131,7 +131,7 @@ org.apache.maven.plugins maven-dependency-plugin - 2.10 + 3.6.0 copy-server-files @@ -151,7 +151,7 @@ org.apache.maven.plugins maven-war-plugin - 3.3.2 + 3.4.0 pom.xml false @@ -263,7 +263,7 @@ maven-failsafe-plugin - 2.22.0 + 3.1.2 alphabetical @@ -287,7 +287,7 @@ maven-resources-plugin - 3.0.2 + 3.3.1 copy-test-resources @@ -313,7 +313,7 @@ org.apache.maven.plugins maven-antrun-plugin - 1.8 + 3.1.0 compile-and-copy-test-classes diff --git a/liberty-maven-plugin/src/it/assembly-archive-update-it/pom.xml b/liberty-maven-plugin/src/it/assembly-archive-update-it/pom.xml index 51b272413..d09b270b5 100644 --- a/liberty-maven-plugin/src/it/assembly-archive-update-it/pom.xml +++ b/liberty-maven-plugin/src/it/assembly-archive-update-it/pom.xml @@ -69,7 +69,7 @@ org.apache.maven.plugins maven-failsafe-plugin - 2.19.1 + 3.1.2 ${liberty.runtime.version} diff --git a/liberty-maven-plugin/src/it/assembly-it/assembly-it-tests/pom.xml b/liberty-maven-plugin/src/it/assembly-it/assembly-it-tests/pom.xml index 0d1080409..b056990c3 100644 --- a/liberty-maven-plugin/src/it/assembly-it/assembly-it-tests/pom.xml +++ b/liberty-maven-plugin/src/it/assembly-it/assembly-it-tests/pom.xml @@ -33,12 +33,12 @@ org.apache.maven.plugins maven-failsafe-plugin - 2.5 + 3.1.2 org.apache.maven.plugins maven-surefire-plugin - 2.5 + 3.1.2 diff --git a/liberty-maven-plugin/src/it/basic-it/pom.xml b/liberty-maven-plugin/src/it/basic-it/pom.xml index b5078d670..1477403d5 100644 --- a/liberty-maven-plugin/src/it/basic-it/pom.xml +++ b/liberty-maven-plugin/src/it/basic-it/pom.xml @@ -45,12 +45,12 @@ org.apache.maven.plugins maven-failsafe-plugin - 2.5 + 3.1.2 org.apache.maven.plugins maven-surefire-plugin - 2.5 + 3.1.2 diff --git a/liberty-maven-plugin/src/it/basic-runtime-properties-dependency-mgmt-it/pom.xml b/liberty-maven-plugin/src/it/basic-runtime-properties-dependency-mgmt-it/pom.xml index 97c9c25e8..6a86729b4 100644 --- a/liberty-maven-plugin/src/it/basic-runtime-properties-dependency-mgmt-it/pom.xml +++ b/liberty-maven-plugin/src/it/basic-runtime-properties-dependency-mgmt-it/pom.xml @@ -45,12 +45,12 @@ org.apache.maven.plugins maven-failsafe-plugin - 2.5 + 3.1.2 org.apache.maven.plugins maven-surefire-plugin - 2.5 + 3.1.2 @@ -104,6 +104,7 @@ true true false + false diff --git a/liberty-maven-plugin/src/it/basic-runtime-properties-override-it/pom.xml b/liberty-maven-plugin/src/it/basic-runtime-properties-override-it/pom.xml index c8da9cb66..e00d778f9 100644 --- a/liberty-maven-plugin/src/it/basic-runtime-properties-override-it/pom.xml +++ b/liberty-maven-plugin/src/it/basic-runtime-properties-override-it/pom.xml @@ -33,12 +33,12 @@ org.apache.maven.plugins maven-failsafe-plugin - 2.5 + 3.1.2 org.apache.maven.plugins maven-surefire-plugin - 2.5 + 3.1.2 @@ -93,6 +93,7 @@ true true false + false diff --git a/liberty-maven-plugin/src/it/basic-runtime-properties-pom-override-it/pom.xml b/liberty-maven-plugin/src/it/basic-runtime-properties-pom-override-it/pom.xml index 7e860c465..71cbda7e1 100644 --- a/liberty-maven-plugin/src/it/basic-runtime-properties-pom-override-it/pom.xml +++ b/liberty-maven-plugin/src/it/basic-runtime-properties-pom-override-it/pom.xml @@ -39,12 +39,12 @@ org.apache.maven.plugins maven-failsafe-plugin - 2.5 + 3.1.2 org.apache.maven.plugins maven-surefire-plugin - 2.5 + 3.1.2 @@ -99,6 +99,7 @@ true true false + false diff --git a/liberty-maven-plugin/src/it/binary-scanner-it/pom.xml b/liberty-maven-plugin/src/it/binary-scanner-it/pom.xml index bc6ae635b..63b51521d 100755 --- a/liberty-maven-plugin/src/it/binary-scanner-it/pom.xml +++ b/liberty-maven-plugin/src/it/binary-scanner-it/pom.xml @@ -49,7 +49,7 @@ org.apache.maven.plugins maven-failsafe-plugin - 2.19.1 + 3.1.2 true once @@ -86,7 +86,7 @@ org.apache.maven.plugins maven-surefire-plugin - 2.19.1 + 3.1.2 true diff --git a/liberty-maven-plugin/src/it/binary-scanner-it/resources/basic-dev-project6/pom.xml b/liberty-maven-plugin/src/it/binary-scanner-it/resources/basic-dev-project6/pom.xml index b837ab762..ad5848a7d 100755 --- a/liberty-maven-plugin/src/it/binary-scanner-it/resources/basic-dev-project6/pom.xml +++ b/liberty-maven-plugin/src/it/binary-scanner-it/resources/basic-dev-project6/pom.xml @@ -127,7 +127,7 @@ org.apache.maven.plugins maven-war-plugin - 3.3.2 + 3.4.0 false pom.xml @@ -137,7 +137,7 @@ org.apache.maven.plugins maven-surefire-plugin - 3.0.0-M1 + 3.1.2 test @@ -177,7 +177,7 @@ org.apache.maven.plugins maven-failsafe-plugin - 3.0.0-M1 + 3.1.2 integration-test diff --git a/liberty-maven-plugin/src/it/binary-scanner-it/resources/basic-dev-project7/pom.xml b/liberty-maven-plugin/src/it/binary-scanner-it/resources/basic-dev-project7/pom.xml index e40d27957..332bf1d66 100755 --- a/liberty-maven-plugin/src/it/binary-scanner-it/resources/basic-dev-project7/pom.xml +++ b/liberty-maven-plugin/src/it/binary-scanner-it/resources/basic-dev-project7/pom.xml @@ -134,7 +134,7 @@ org.apache.maven.plugins maven-war-plugin - 3.3.2 + 3.4.0 false pom.xml @@ -144,7 +144,7 @@ org.apache.maven.plugins maven-surefire-plugin - 3.0.0-M1 + 3.1.2 test @@ -184,7 +184,7 @@ org.apache.maven.plugins maven-failsafe-plugin - 3.0.0-M1 + 3.1.2 integration-test diff --git a/liberty-maven-plugin/src/it/binary-scanner-it/resources/basic-dev-project8/pom.xml b/liberty-maven-plugin/src/it/binary-scanner-it/resources/basic-dev-project8/pom.xml index a39f6a901..ac3dfad0c 100755 --- a/liberty-maven-plugin/src/it/binary-scanner-it/resources/basic-dev-project8/pom.xml +++ b/liberty-maven-plugin/src/it/binary-scanner-it/resources/basic-dev-project8/pom.xml @@ -138,7 +138,7 @@ org.apache.maven.plugins maven-war-plugin - 3.3.2 + 3.4.0 false pom.xml @@ -148,7 +148,7 @@ org.apache.maven.plugins maven-surefire-plugin - 3.0.0-M1 + 3.1.2 test @@ -188,7 +188,7 @@ org.apache.maven.plugins maven-failsafe-plugin - 3.0.0-M1 + 3.1.2 integration-test diff --git a/liberty-maven-plugin/src/it/binary-scanner-it/resources/basic-dev-project9/pom.xml b/liberty-maven-plugin/src/it/binary-scanner-it/resources/basic-dev-project9/pom.xml index e5bf2dae3..26824304e 100755 --- a/liberty-maven-plugin/src/it/binary-scanner-it/resources/basic-dev-project9/pom.xml +++ b/liberty-maven-plugin/src/it/binary-scanner-it/resources/basic-dev-project9/pom.xml @@ -134,7 +134,7 @@ org.apache.maven.plugins maven-war-plugin - 3.3.2 + 3.4.0 false pom.xml @@ -144,7 +144,7 @@ org.apache.maven.plugins maven-surefire-plugin - 3.0.0-M1 + 3.1.2 test @@ -184,7 +184,7 @@ org.apache.maven.plugins maven-failsafe-plugin - 3.0.0-M1 + 3.1.2 integration-test diff --git a/liberty-maven-plugin/src/it/compile-jsp-it/pom.xml b/liberty-maven-plugin/src/it/compile-jsp-it/pom.xml index b18c1a0e4..7da8c6cac 100644 --- a/liberty-maven-plugin/src/it/compile-jsp-it/pom.xml +++ b/liberty-maven-plugin/src/it/compile-jsp-it/pom.xml @@ -33,17 +33,17 @@ org.apache.maven.plugins maven-war-plugin - 3.3.2 + 3.4.0 org.apache.maven.plugins maven-failsafe-plugin - 2.5 + 3.1.2 org.apache.maven.plugins maven-surefire-plugin - 2.5 + 3.1.2 @@ -133,6 +133,7 @@ true true false + false diff --git a/liberty-maven-plugin/src/it/config-directory-it/pom.xml b/liberty-maven-plugin/src/it/config-directory-it/pom.xml index d6fbc0a85..1cd537006 100644 --- a/liberty-maven-plugin/src/it/config-directory-it/pom.xml +++ b/liberty-maven-plugin/src/it/config-directory-it/pom.xml @@ -44,17 +44,17 @@ org.apache.maven.plugins maven-war-plugin - 3.3.2 + 3.4.0 org.apache.maven.plugins maven-failsafe-plugin - 2.5 + 3.1.2 org.apache.maven.plugins maven-surefire-plugin - 2.5 + 3.1.2 @@ -102,6 +102,7 @@ true true false + false @@ -160,7 +161,7 @@ org.apache.maven.plugins maven-failsafe-plugin - 2.19.1 + 3.1.2 **/MicroClean*.java> @@ -187,7 +188,7 @@ org.apache.maven.plugins maven-failsafe-plugin - 2.19.1 + 3.1.2 **/MicroCleanBefore*.java @@ -209,7 +210,7 @@ org.apache.maven.plugins maven-failsafe-plugin - 2.19.1 + 3.1.2 **/MicroCleanAfter*.java diff --git a/liberty-maven-plugin/src/it/config-directory-it/src/test/resources/invalidDirPom.xml b/liberty-maven-plugin/src/it/config-directory-it/src/test/resources/invalidDirPom.xml index 7137c1c27..0e7536d0a 100644 --- a/liberty-maven-plugin/src/it/config-directory-it/src/test/resources/invalidDirPom.xml +++ b/liberty-maven-plugin/src/it/config-directory-it/src/test/resources/invalidDirPom.xml @@ -18,7 +18,7 @@ org.apache.maven.plugins maven-war-plugin - 3.3.2 + 3.4.0 diff --git a/liberty-maven-plugin/src/it/config-packagefile-multi-module-runnable-it/deploy-app/pom.xml b/liberty-maven-plugin/src/it/config-packagefile-multi-module-runnable-it/deploy-app/pom.xml index 2086f2e81..ffe27bf0a 100644 --- a/liberty-maven-plugin/src/it/config-packagefile-multi-module-runnable-it/deploy-app/pom.xml +++ b/liberty-maven-plugin/src/it/config-packagefile-multi-module-runnable-it/deploy-app/pom.xml @@ -45,7 +45,7 @@ org.apache.maven.plugins maven-war-plugin - 3.3.2 + 3.4.0 false pom.xml @@ -117,7 +117,7 @@ org.apache.maven.plugins maven-failsafe-plugin - 2.19.1 + 3.1.2 true once @@ -147,7 +147,7 @@ org.apache.maven.plugins maven-surefire-plugin - 2.19.1 + 3.1.2 true diff --git a/liberty-maven-plugin/src/it/config-packagefile-multi-module-runnable-it/make-package/pom.xml b/liberty-maven-plugin/src/it/config-packagefile-multi-module-runnable-it/make-package/pom.xml index c5097a11d..f1591f9b0 100644 --- a/liberty-maven-plugin/src/it/config-packagefile-multi-module-runnable-it/make-package/pom.xml +++ b/liberty-maven-plugin/src/it/config-packagefile-multi-module-runnable-it/make-package/pom.xml @@ -36,17 +36,17 @@ org.apache.maven.plugins maven-war-plugin - 3.3.2 + 3.4.0 org.apache.maven.plugins maven-failsafe-plugin - 2.5 + 3.1.2 org.apache.maven.plugins maven-surefire-plugin - 2.5 + 3.1.2 diff --git a/liberty-maven-plugin/src/it/deploy-loose-config-apps-it/pom.xml b/liberty-maven-plugin/src/it/deploy-loose-config-apps-it/pom.xml index b0b781c7e..db5964ed0 100644 --- a/liberty-maven-plugin/src/it/deploy-loose-config-apps-it/pom.xml +++ b/liberty-maven-plugin/src/it/deploy-loose-config-apps-it/pom.xml @@ -50,7 +50,7 @@ org.apache.maven.plugins maven-war-plugin - 3.3.2 + 3.4.0 false pom.xml @@ -125,6 +125,7 @@ true true false + false @@ -132,7 +133,7 @@ org.apache.maven.plugins maven-failsafe-plugin - 2.19.1 + 3.1.2 true once @@ -162,7 +163,7 @@ org.apache.maven.plugins maven-surefire-plugin - 2.19.1 + 3.1.2 true @@ -191,7 +192,7 @@ org.apache.maven.plugins maven-failsafe-plugin - 2.19.1 + 3.1.2 **/AppFileTest.java @@ -227,7 +228,7 @@ org.apache.maven.plugins maven-failsafe-plugin - 2.19.1 + 3.1.2 **/LooseConfigTest.java @@ -260,7 +261,7 @@ org.apache.maven.plugins maven-failsafe-plugin - 2.19.1 + 3.1.2 **/AppFileTest.java diff --git a/liberty-maven-plugin/src/it/deploy-loose-config-it/pom.xml b/liberty-maven-plugin/src/it/deploy-loose-config-it/pom.xml index 211c4fa0a..ee9e6fd16 100644 --- a/liberty-maven-plugin/src/it/deploy-loose-config-it/pom.xml +++ b/liberty-maven-plugin/src/it/deploy-loose-config-it/pom.xml @@ -50,7 +50,7 @@ org.apache.maven.plugins maven-war-plugin - 3.3.2 + 3.4.0 false pom.xml @@ -115,6 +115,7 @@ true true false + false @@ -122,7 +123,7 @@ org.apache.maven.plugins maven-failsafe-plugin - 2.19.1 + 3.1.2 true once @@ -152,7 +153,7 @@ org.apache.maven.plugins maven-surefire-plugin - 2.19.1 + 3.1.2 true @@ -181,7 +182,7 @@ org.apache.maven.plugins maven-failsafe-plugin - 2.19.1 + 3.1.2 **/AppFileTest.java @@ -217,7 +218,7 @@ org.apache.maven.plugins maven-failsafe-plugin - 2.19.1 + 3.1.2 **/LooseConfigTest.java @@ -254,7 +255,7 @@ org.apache.maven.plugins maven-failsafe-plugin - 2.19.1 + 3.1.2 **/AppFileTest.java diff --git a/liberty-maven-plugin/src/it/dev-it/pom.xml b/liberty-maven-plugin/src/it/dev-it/pom.xml index f213ab05a..14f61f504 100755 --- a/liberty-maven-plugin/src/it/dev-it/pom.xml +++ b/liberty-maven-plugin/src/it/dev-it/pom.xml @@ -49,7 +49,7 @@ org.apache.maven.plugins maven-failsafe-plugin - 3.0.0 + 3.1.2 true 1 @@ -85,7 +85,7 @@ org.apache.maven.plugins maven-surefire-plugin - 3.0.0 + 3.1.2 true diff --git a/liberty-maven-plugin/src/it/dev-it/resources/basic-dev-project-umbrella-deps/pom.xml b/liberty-maven-plugin/src/it/dev-it/resources/basic-dev-project-umbrella-deps/pom.xml index e7c903222..beb894879 100644 --- a/liberty-maven-plugin/src/it/dev-it/resources/basic-dev-project-umbrella-deps/pom.xml +++ b/liberty-maven-plugin/src/it/dev-it/resources/basic-dev-project-umbrella-deps/pom.xml @@ -95,7 +95,7 @@ org.apache.maven.plugins maven-war-plugin - 3.3.2 + 3.4.0 false pom.xml @@ -105,7 +105,7 @@ org.apache.maven.plugins maven-surefire-plugin - 3.0.0-M1 + 3.1.2 test @@ -144,7 +144,7 @@ org.apache.maven.plugins maven-failsafe-plugin - 3.0.0-M1 + 3.1.2 integration-test diff --git a/liberty-maven-plugin/src/it/dev-it/resources/basic-dev-project/pom.xml b/liberty-maven-plugin/src/it/dev-it/resources/basic-dev-project/pom.xml index 7d1a57a16..5bf5fc698 100755 --- a/liberty-maven-plugin/src/it/dev-it/resources/basic-dev-project/pom.xml +++ b/liberty-maven-plugin/src/it/dev-it/resources/basic-dev-project/pom.xml @@ -169,7 +169,7 @@ org.apache.maven.plugins maven-war-plugin - 3.3.2 + 3.4.0 false pom.xml @@ -179,7 +179,7 @@ org.apache.maven.plugins maven-surefire-plugin - 3.0.0-M1 + 3.1.2 test @@ -219,7 +219,7 @@ org.apache.maven.plugins maven-failsafe-plugin - 3.0.0-M1 + 3.1.2 integration-test diff --git a/liberty-maven-plugin/src/it/dev-it/resources/exploded-war-project/pom.xml b/liberty-maven-plugin/src/it/dev-it/resources/exploded-war-project/pom.xml index 0d4147898..4654d6c19 100755 --- a/liberty-maven-plugin/src/it/dev-it/resources/exploded-war-project/pom.xml +++ b/liberty-maven-plugin/src/it/dev-it/resources/exploded-war-project/pom.xml @@ -149,7 +149,7 @@ org.apache.maven.plugins maven-war-plugin - 3.2.2 + 3.4.0 false pom.xml @@ -175,7 +175,7 @@ org.apache.maven.plugins maven-surefire-plugin - 3.0.0-M1 + 3.1.2 test @@ -215,7 +215,7 @@ org.apache.maven.plugins maven-failsafe-plugin - 3.0.0-M1 + 3.1.2 integration-test diff --git a/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/multipleLibertyModules/ear1/pom.xml b/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/multipleLibertyModules/ear1/pom.xml index bded9ef57..484154d45 100644 --- a/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/multipleLibertyModules/ear1/pom.xml +++ b/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/multipleLibertyModules/ear1/pom.xml @@ -66,7 +66,7 @@ org.apache.maven.plugins maven-ear-plugin - 3.0.2 + 3.3.0 @@ -97,7 +97,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.8.1 + 3.11.0 test-compile @@ -111,7 +111,7 @@ org.apache.maven.plugins maven-failsafe-plugin - 3.0.0-M7 + 3.1.2 diff --git a/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/multipleLibertyModules/ear2/pom.xml b/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/multipleLibertyModules/ear2/pom.xml index f7963ec76..b93bb36a3 100644 --- a/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/multipleLibertyModules/ear2/pom.xml +++ b/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/multipleLibertyModules/ear2/pom.xml @@ -66,7 +66,7 @@ org.apache.maven.plugins maven-ear-plugin - 3.0.2 + 3.3.0 @@ -97,7 +97,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.8.1 + 3.11.0 test-compile @@ -111,7 +111,7 @@ org.apache.maven.plugins maven-failsafe-plugin - 3.0.0-M7 + 3.1.2 diff --git a/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/multipleLibertyModules/jar/pom.xml b/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/multipleLibertyModules/jar/pom.xml index ffc2b5d38..c3611cb0f 100644 --- a/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/multipleLibertyModules/jar/pom.xml +++ b/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/multipleLibertyModules/jar/pom.xml @@ -33,7 +33,7 @@ org.apache.maven.plugins maven-surefire-plugin - 3.0.0-M7 + 3.1.2 diff --git a/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/multipleLibertyModules/war/pom.xml b/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/multipleLibertyModules/war/pom.xml index bf0eeb78a..44e7bf0c9 100644 --- a/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/multipleLibertyModules/war/pom.xml +++ b/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/multipleLibertyModules/war/pom.xml @@ -67,13 +67,13 @@ org.apache.maven.plugins maven-failsafe-plugin - 3.0.0-M7 + 3.1.2 org.apache.maven.plugins maven-surefire-plugin - 3.0.0-M7 + 3.1.2 diff --git a/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/sample.ejb/ejb-ear/pom.xml b/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/sample.ejb/ejb-ear/pom.xml index ac6e56720..63088ef8e 100644 --- a/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/sample.ejb/ejb-ear/pom.xml +++ b/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/sample.ejb/ejb-ear/pom.xml @@ -60,11 +60,22 @@ org.apache.maven.plugins maven-ear-plugin - 2.10.1 + 3.3.0 7 - no-version true + + + sample + ejb-war + ejb-war.war + + + sample + ejb-ejb + ejb-ejb.jar + + diff --git a/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/sample.ejb/ejb-ejb/pom.xml b/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/sample.ejb/ejb-ejb/pom.xml index 70e7264f4..6d55a0fc7 100644 --- a/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/sample.ejb/ejb-ejb/pom.xml +++ b/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/sample.ejb/ejb-ejb/pom.xml @@ -34,7 +34,7 @@ org.apache.maven.plugins maven-ejb-plugin - 3.0.0 + 3.2.1 3.1 diff --git a/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/sample.ejb/ejb-war/pom.xml b/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/sample.ejb/ejb-war/pom.xml index d15eecd21..3d620895b 100644 --- a/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/sample.ejb/ejb-war/pom.xml +++ b/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/sample.ejb/ejb-war/pom.xml @@ -41,7 +41,7 @@ org.apache.maven.plugins maven-war-plugin - 3.2.0 + 3.4.0 pom.xml diff --git a/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/skipTests/ear/pom.xml b/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/skipTests/ear/pom.xml index b1dcad904..3ed2e8636 100644 --- a/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/skipTests/ear/pom.xml +++ b/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/skipTests/ear/pom.xml @@ -55,7 +55,7 @@ org.apache.maven.plugins maven-ear-plugin - 3.0.2 + 3.3.0 @@ -81,7 +81,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.8.1 + 3.11.0 test-compile @@ -95,7 +95,7 @@ org.apache.maven.plugins maven-failsafe-plugin - 3.0.0-M7 + 3.1.2 diff --git a/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/skipTests/jar/pom.xml b/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/skipTests/jar/pom.xml index e1e63c4e1..abf1c3765 100644 --- a/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/skipTests/jar/pom.xml +++ b/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/skipTests/jar/pom.xml @@ -39,7 +39,7 @@ org.apache.maven.plugins maven-surefire-plugin - 3.0.0-M7 + 3.1.2 diff --git a/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/skipTests/pom.xml b/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/skipTests/pom.xml index 1bbee445b..ec409d73f 100644 --- a/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/skipTests/pom.xml +++ b/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/skipTests/pom.xml @@ -58,13 +58,13 @@ org.apache.maven.plugins maven-failsafe-plugin - 2.22.2 + 3.1.2 org.apache.maven.plugins maven-surefire-plugin - 2.22.2 + 3.1.2 diff --git a/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/skipTests/war/pom.xml b/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/skipTests/war/pom.xml index a64da4dee..0fc068420 100644 --- a/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/skipTests/war/pom.xml +++ b/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/skipTests/war/pom.xml @@ -60,13 +60,13 @@ org.apache.maven.plugins maven-failsafe-plugin - 3.0.0-M7 + 3.1.2 org.apache.maven.plugins maven-surefire-plugin - 3.0.0-M7 + 3.1.2 diff --git a/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/typeA/ear/pom.xml b/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/typeA/ear/pom.xml index 8021cd179..48196cc30 100644 --- a/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/typeA/ear/pom.xml +++ b/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/typeA/ear/pom.xml @@ -66,7 +66,7 @@ org.apache.maven.plugins maven-ear-plugin - 3.0.2 + 3.3.0 @@ -97,7 +97,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.8.1 + 3.11.0 test-compile @@ -111,7 +111,7 @@ org.apache.maven.plugins maven-failsafe-plugin - 3.0.0-M7 + 3.1.2 diff --git a/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/typeA/jar/pom.xml b/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/typeA/jar/pom.xml index ffc2b5d38..c3611cb0f 100644 --- a/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/typeA/jar/pom.xml +++ b/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/typeA/jar/pom.xml @@ -33,7 +33,7 @@ org.apache.maven.plugins maven-surefire-plugin - 3.0.0-M7 + 3.1.2 diff --git a/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/typeA/war/pom.xml b/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/typeA/war/pom.xml index 7d08902b3..aad37608c 100644 --- a/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/typeA/war/pom.xml +++ b/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/typeA/war/pom.xml @@ -67,18 +67,18 @@ org.apache.maven.plugins maven-failsafe-plugin - 3.0.0-M7 + 3.1.2 org.apache.maven.plugins maven-surefire-plugin - 3.0.0-M7 + 3.1.2 org.apache.maven.plugins maven-war-plugin - 3.3.2 + 3.4.0 pom.xml diff --git a/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/typeA2/ear/pom.xml b/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/typeA2/ear/pom.xml index fbfed36c9..232e46800 100644 --- a/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/typeA2/ear/pom.xml +++ b/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/typeA2/ear/pom.xml @@ -62,7 +62,7 @@ org.apache.maven.plugins maven-ear-plugin - 3.0.2 + 3.3.0 @@ -93,7 +93,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.8.1 + 3.11.0 test-compile @@ -108,7 +108,7 @@ org.apache.maven.plugins maven-failsafe-plugin - 3.0.0-M7 + 3.1.2 diff --git a/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/typeA3/ear/pom.xml b/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/typeA3/ear/pom.xml index d8dd7af83..f576b899f 100644 --- a/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/typeA3/ear/pom.xml +++ b/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/typeA3/ear/pom.xml @@ -45,7 +45,7 @@ org.apache.maven.plugins maven-ear-plugin - 3.0.2 + 3.3.0 @@ -71,7 +71,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.8.1 + 3.11.0 test-compile @@ -85,7 +85,7 @@ org.apache.maven.plugins maven-failsafe-plugin - 3.0.0-M7 + 3.1.2 diff --git a/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/typeA3/pom.xml b/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/typeA3/pom.xml index 5b884eab9..50e59592e 100644 --- a/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/typeA3/pom.xml +++ b/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/typeA3/pom.xml @@ -40,20 +40,20 @@ io.openliberty.tools liberty-maven-plugin - 3.4-SNAPSHOT + 3.8.2-SNAPSHOT org.apache.maven.plugins maven-failsafe-plugin - 2.22.2 + 3.1.2 org.apache.maven.plugins maven-surefire-plugin - 2.22.2 + 3.1.2 diff --git a/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/typeB/war/pom.xml b/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/typeB/war/pom.xml index 7aa9e73cb..79c6b1e39 100644 --- a/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/typeB/war/pom.xml +++ b/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/typeB/war/pom.xml @@ -83,7 +83,7 @@ org.apache.maven.plugins maven-war-plugin - 3.3.1 + 3.4.0 @@ -114,7 +114,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.8.1 + 3.11.0 test-compile @@ -129,7 +129,7 @@ org.apache.maven.plugins maven-failsafe-plugin - 3.0.0-M7 + 3.1.2 diff --git a/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/typeE/ear/pom.xml b/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/typeE/ear/pom.xml index db1250d54..159b7cede 100644 --- a/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/typeE/ear/pom.xml +++ b/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/typeE/ear/pom.xml @@ -46,7 +46,7 @@ org.apache.maven.plugins maven-ear-plugin - 3.0.2 + 3.3.0 diff --git a/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/typeE/pom/pom.xml b/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/typeE/pom/pom.xml index 0ac74e190..1371f8b0f 100644 --- a/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/typeE/pom/pom.xml +++ b/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/typeE/pom/pom.xml @@ -70,7 +70,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.8.1 + 3.11.0 test-compile @@ -85,7 +85,7 @@ org.apache.maven.plugins maven-failsafe-plugin - 3.0.0-M7 + 3.1.2 diff --git a/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/typeG/ear/pom.xml b/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/typeG/ear/pom.xml index 6b2f3a2cc..a98f5473c 100644 --- a/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/typeG/ear/pom.xml +++ b/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/typeG/ear/pom.xml @@ -38,7 +38,7 @@ org.apache.maven.plugins maven-ear-plugin - 3.0.2 + 3.3.0 diff --git a/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/typeG/pom/pom.xml b/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/typeG/pom/pom.xml index 4eb88b667..0e5b51666 100644 --- a/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/typeG/pom/pom.xml +++ b/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/typeG/pom/pom.xml @@ -69,7 +69,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.8.1 + 3.11.0 test-compile @@ -84,7 +84,7 @@ org.apache.maven.plugins maven-failsafe-plugin - 3.0.0-M7 + 3.1.2 diff --git a/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/typeH/ear/pom.xml b/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/typeH/ear/pom.xml index 6b2f3a2cc..a98f5473c 100644 --- a/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/typeH/ear/pom.xml +++ b/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/typeH/ear/pom.xml @@ -38,7 +38,7 @@ org.apache.maven.plugins maven-ear-plugin - 3.0.2 + 3.3.0 diff --git a/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/typeH/pom/pom.xml b/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/typeH/pom/pom.xml index 295bad12a..75ba1cae9 100644 --- a/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/typeH/pom/pom.xml +++ b/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/typeH/pom/pom.xml @@ -70,7 +70,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.8.1 + 3.11.0 test-compile @@ -85,7 +85,7 @@ org.apache.maven.plugins maven-failsafe-plugin - 3.0.0-M7 + 3.1.2 diff --git a/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/typeH/war/pom.xml b/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/typeH/war/pom.xml index cac0f9dfb..70b8c4bdc 100644 --- a/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/typeH/war/pom.xml +++ b/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/typeH/war/pom.xml @@ -56,7 +56,7 @@ org.apache.maven.plugins maven-war-plugin - 3.3.2 + 3.4.0 pom.xml diff --git a/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/typeI/ear/pom.xml b/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/typeI/ear/pom.xml index b4d8cdcd6..22bbb5fbe 100644 --- a/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/typeI/ear/pom.xml +++ b/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/typeI/ear/pom.xml @@ -46,7 +46,7 @@ org.apache.maven.plugins maven-ear-plugin - 3.0.2 + 3.3.0 @@ -77,7 +77,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.8.1 + 3.11.0 test-compile @@ -92,7 +92,7 @@ org.apache.maven.plugins maven-failsafe-plugin - 3.0.0-M7 + 3.1.2 diff --git a/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/typeI2/ear/pom.xml b/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/typeI2/ear/pom.xml index 4365c2ed1..449c78b34 100644 --- a/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/typeI2/ear/pom.xml +++ b/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/typeI2/ear/pom.xml @@ -46,7 +46,7 @@ org.apache.maven.plugins maven-ear-plugin - 3.0.2 + 3.3.0 @@ -77,7 +77,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.8.1 + 3.11.0 test-compile @@ -92,7 +92,7 @@ org.apache.maven.plugins maven-failsafe-plugin - 3.0.0-M7 + 3.1.2 diff --git a/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/typeJ/pom/pom.xml b/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/typeJ/pom/pom.xml index 2971284e5..6d4613fca 100644 --- a/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/typeJ/pom/pom.xml +++ b/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/typeJ/pom/pom.xml @@ -76,7 +76,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.8.1 + 3.11.0 test-compile @@ -91,7 +91,7 @@ org.apache.maven.plugins maven-failsafe-plugin - 3.0.0-M7 + 3.1.2 diff --git a/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/typeJ/war1/pom.xml b/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/typeJ/war1/pom.xml index 657f9b097..9d95fddf3 100644 --- a/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/typeJ/war1/pom.xml +++ b/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/typeJ/war1/pom.xml @@ -67,7 +67,7 @@ org.apache.maven.plugins maven-war-plugin - 3.3.1 + 3.4.0 @@ -98,7 +98,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.8.1 + 3.11.0 test-compile @@ -113,7 +113,7 @@ org.apache.maven.plugins maven-failsafe-plugin - 3.0.0-M7 + 3.1.2 diff --git a/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/typeJ/war2/pom.xml b/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/typeJ/war2/pom.xml index b92c18c16..da017170c 100644 --- a/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/typeJ/war2/pom.xml +++ b/liberty-maven-plugin/src/it/dev-it/resources/multi-module-projects/typeJ/war2/pom.xml @@ -67,7 +67,7 @@ org.apache.maven.plugins maven-war-plugin - 3.3.1 + 3.4.0 @@ -98,7 +98,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.8.1 + 3.11.0 test-compile @@ -113,7 +113,7 @@ org.apache.maven.plugins maven-failsafe-plugin - 3.0.0-M7 + 3.1.2 diff --git a/liberty-maven-plugin/src/it/ear-project-it/AppXmlEAR/pom.xml b/liberty-maven-plugin/src/it/ear-project-it/AppXmlEAR/pom.xml index fb32bd47b..a61490f79 100644 --- a/liberty-maven-plugin/src/it/ear-project-it/AppXmlEAR/pom.xml +++ b/liberty-maven-plugin/src/it/ear-project-it/AppXmlEAR/pom.xml @@ -53,7 +53,7 @@ libraries are in easy way to package any libraries needed in the ear, and automatically have any modules (EJB-JARs and WARs) use them --> lib - no-version + @{artifactId}@.@{extension}@ ${project.basedir}/src/main/application/META-INF/application.xml @@ -134,7 +134,6 @@ org.apache.maven.plugins maven-failsafe-plugin - 2.19.1 true once diff --git a/liberty-maven-plugin/src/it/ear-project-it/AppXmlEAR/src/test/java/net/wasdev/wlp/maven/test/it/LooseConfigTestIT.java b/liberty-maven-plugin/src/it/ear-project-it/AppXmlEAR/src/test/java/net/wasdev/wlp/maven/test/it/LooseConfigTestIT.java index f57090c72..6c3556461 100644 --- a/liberty-maven-plugin/src/it/ear-project-it/AppXmlEAR/src/test/java/net/wasdev/wlp/maven/test/it/LooseConfigTestIT.java +++ b/liberty-maven-plugin/src/it/ear-project-it/AppXmlEAR/src/test/java/net/wasdev/wlp/maven/test/it/LooseConfigTestIT.java @@ -1,5 +1,5 @@ /******************************************************************************* - * (c) Copyright IBM Corporation 2017. + * (c) Copyright IBM Corporation 2017, 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -65,5 +65,20 @@ public void testLooseApplicationFileContent() throws Exception { File appXml = new File("../src/main/application/META-INF/application.xml"); assertEquals("file sourceOnDisk attribute value", appXml.getCanonicalPath(), nodes.item(0).getAttributes().getNamedItem("sourceOnDisk").getNodeValue()); + + expression = "/archive/archive/archive"; + nodes = (NodeList) xPath.compile(expression).evaluate(inputDoc, XPathConstants.NODESET); + assertEquals("Number of element ==>", 1, nodes.getLength()); + assertEquals("archive targetInArchive attribute value", "/WEB-INF/lib/SampleBundle-1.0-SNAPSHOT.jar", + nodes.item(0).getAttributes().getNamedItem("targetInArchive").getNodeValue()); + + expression = "/archive/archive/archive/dir"; + nodes = (NodeList) xPath.compile(expression).evaluate(inputDoc, XPathConstants.NODESET); + assertEquals("Number of element ==>", 1, nodes.getLength()); + + expression = "/archive/archive/archive/file"; + nodes = (NodeList) xPath.compile(expression).evaluate(inputDoc, XPathConstants.NODESET); + assertEquals("Number of element ==>", 1, nodes.getLength()); + } } diff --git a/liberty-maven-plugin/src/it/ear-project-it/SampleBundle/pom.xml b/liberty-maven-plugin/src/it/ear-project-it/SampleBundle/pom.xml new file mode 100644 index 000000000..acf96e853 --- /dev/null +++ b/liberty-maven-plugin/src/it/ear-project-it/SampleBundle/pom.xml @@ -0,0 +1,51 @@ + + + 4.0.0 + + + io.openliberty.tools.it + ear-project-it + 1.0-SNAPSHOT + + + SampleBundle + bundle + + ear-project-it: SampleBundle Module + + + + javax + javaee-api + + + + + junit + junit + + + + + + + org.apache.felix + maven-bundle-plugin + true + + + io.openliberty.tools.it + wasdev.sample.bundle*;version=${project.version} + + * + + <_removeheaders>Bnd-LastModified + <_reproducible>true + + + + + + + diff --git a/liberty-maven-plugin/src/it/ear-project-it/SampleBundle/src/main/java/wasdev/sample/bundle/SampleBundle.java b/liberty-maven-plugin/src/it/ear-project-it/SampleBundle/src/main/java/wasdev/sample/bundle/SampleBundle.java new file mode 100644 index 000000000..5730e613f --- /dev/null +++ b/liberty-maven-plugin/src/it/ear-project-it/SampleBundle/src/main/java/wasdev/sample/bundle/SampleBundle.java @@ -0,0 +1,9 @@ + +package wasdev.sample.bundle; + +public class SampleBundle { + + public String hello() { + return "Hello Bundle World."; + } +} diff --git a/liberty-maven-plugin/src/it/ear-project-it/SampleEAR-classifier-app/pom.xml b/liberty-maven-plugin/src/it/ear-project-it/SampleEAR-classifier-app/pom.xml index 49df890f9..3474044fc 100644 --- a/liberty-maven-plugin/src/it/ear-project-it/SampleEAR-classifier-app/pom.xml +++ b/liberty-maven-plugin/src/it/ear-project-it/SampleEAR-classifier-app/pom.xml @@ -47,7 +47,6 @@ org.apache.maven.plugins maven-ear-plugin - 3.0.2 7 @@ -65,6 +64,17 @@ + + org.apache.maven.plugins + maven-install-plugin + 3.1.1 + + + default-install + none + + + io.openliberty.tools liberty-maven-plugin @@ -128,7 +138,6 @@ org.apache.maven.plugins maven-failsafe-plugin - 2.19.1 true once diff --git a/liberty-maven-plugin/src/it/ear-project-it/SampleEAR/pom.xml b/liberty-maven-plugin/src/it/ear-project-it/SampleEAR/pom.xml index eb8137ea5..36517a6d7 100644 --- a/liberty-maven-plugin/src/it/ear-project-it/SampleEAR/pom.xml +++ b/liberty-maven-plugin/src/it/ear-project-it/SampleEAR/pom.xml @@ -52,7 +52,6 @@ org.apache.maven.plugins maven-ear-plugin - 3.0.2 7 @@ -153,7 +152,6 @@ org.apache.maven.plugins maven-failsafe-plugin - 2.19.1 true once diff --git a/liberty-maven-plugin/src/it/ear-project-it/SampleEJB-classifier-dep/pom.xml b/liberty-maven-plugin/src/it/ear-project-it/SampleEJB-classifier-dep/pom.xml index 68c393301..e6c7c10e4 100644 --- a/liberty-maven-plugin/src/it/ear-project-it/SampleEJB-classifier-dep/pom.xml +++ b/liberty-maven-plugin/src/it/ear-project-it/SampleEJB-classifier-dep/pom.xml @@ -38,6 +38,17 @@ the-ejb + + org.apache.maven.plugins + maven-install-plugin + 3.1.1 + + + default-install + none + + + diff --git a/liberty-maven-plugin/src/it/ear-project-it/SampleEar_NonLooseApp/pom.xml b/liberty-maven-plugin/src/it/ear-project-it/SampleEar_NonLooseApp/pom.xml index 0dee30f83..1d2041dfe 100644 --- a/liberty-maven-plugin/src/it/ear-project-it/SampleEar_NonLooseApp/pom.xml +++ b/liberty-maven-plugin/src/it/ear-project-it/SampleEar_NonLooseApp/pom.xml @@ -52,7 +52,6 @@ org.apache.maven.plugins maven-ear-plugin - 3.0.2 7 @@ -153,7 +152,6 @@ org.apache.maven.plugins maven-failsafe-plugin - 2.19.1 true once diff --git a/liberty-maven-plugin/src/it/ear-project-it/SampleWAR/pom.xml b/liberty-maven-plugin/src/it/ear-project-it/SampleWAR/pom.xml index 68fdf92c6..c1edba40a 100644 --- a/liberty-maven-plugin/src/it/ear-project-it/SampleWAR/pom.xml +++ b/liberty-maven-plugin/src/it/ear-project-it/SampleWAR/pom.xml @@ -30,6 +30,11 @@ 1.0-SNAPSHOT provided + + io.openliberty.tools.it + SampleBundle + 1.0-SNAPSHOT + diff --git a/liberty-maven-plugin/src/it/ear-project-it/helloworld-ear/pom.xml b/liberty-maven-plugin/src/it/ear-project-it/helloworld-ear/pom.xml index d1d2db2be..4a379e955 100644 --- a/liberty-maven-plugin/src/it/ear-project-it/helloworld-ear/pom.xml +++ b/liberty-maven-plugin/src/it/ear-project-it/helloworld-ear/pom.xml @@ -35,7 +35,6 @@ maven-ear-plugin - 3.0.2 7 @{artifactId}@.@{extension}@ @@ -106,7 +105,6 @@ org.apache.maven.plugins maven-compiler-plugin - 3.6.1 @@ -118,7 +116,6 @@ org.apache.maven.plugins maven-failsafe-plugin - 2.19.1 diff --git a/liberty-maven-plugin/src/it/ear-project-it/pom.xml b/liberty-maven-plugin/src/it/ear-project-it/pom.xml index fa703d18f..b3ba0caca 100644 --- a/liberty-maven-plugin/src/it/ear-project-it/pom.xml +++ b/liberty-maven-plugin/src/it/ear-project-it/pom.xml @@ -14,6 +14,7 @@ SampleEJB + SampleBundle SampleWAR SampleWAR2 AppXmlEAR @@ -63,27 +64,37 @@ org.apache.maven.plugins maven-war-plugin - 3.1.0 + 3.4.0 org.apache.maven.plugins maven-ejb-plugin - 2.5.1 + 3.2.1 + + + org.apache.felix + maven-bundle-plugin + 5.1.8 org.apache.maven.plugins maven-ear-plugin - 2.10.1 + 3.3.0 org.apache.maven.plugins maven-rar-plugin - 2.4 + 3.0.0 org.apache.maven.plugins maven-compiler-plugin - 3.6.1 + 3.11.0 + + + org.apache.maven.plugins + maven-failsafe-plugin + 3.1.2 diff --git a/liberty-maven-plugin/src/it/ear-project-it/skinnywar-ear/pom.xml b/liberty-maven-plugin/src/it/ear-project-it/skinnywar-ear/pom.xml index 8af1fd2a9..0720cb034 100644 --- a/liberty-maven-plugin/src/it/ear-project-it/skinnywar-ear/pom.xml +++ b/liberty-maven-plugin/src/it/ear-project-it/skinnywar-ear/pom.xml @@ -50,12 +50,11 @@ org.apache.maven.plugins maven-ear-plugin - 2.10.1 7 - no-version lib true + @{artifactId}@.@{extension}@ @@ -95,7 +94,6 @@ org.apache.maven.plugins maven-compiler-plugin - 3.6.1 @@ -107,7 +105,6 @@ org.apache.maven.plugins maven-failsafe-plugin - 2.19.1 diff --git a/liberty-maven-plugin/src/it/ear-project-it/skinnywar-ear/src/test/java/net/wasdev/wlp/maven/test/it/LooseConfigTestIT.java b/liberty-maven-plugin/src/it/ear-project-it/skinnywar-ear/src/test/java/net/wasdev/wlp/maven/test/it/LooseConfigTestIT.java index 4e87218e7..e3dc6d632 100644 --- a/liberty-maven-plugin/src/it/ear-project-it/skinnywar-ear/src/test/java/net/wasdev/wlp/maven/test/it/LooseConfigTestIT.java +++ b/liberty-maven-plugin/src/it/ear-project-it/skinnywar-ear/src/test/java/net/wasdev/wlp/maven/test/it/LooseConfigTestIT.java @@ -77,10 +77,10 @@ public void testLooseApplicationFileContent() throws Exception { expression = "/archive/archive/dir"; nodes = (NodeList) xPath.compile(expression).evaluate(inputDoc, XPathConstants.NODESET); - assertEquals("Number of element ==>", 3, nodes.getLength()); + assertEquals("Number of element ==>", 2, nodes.getLength()); expression = "/archive/archive/file"; nodes = (NodeList) xPath.compile(expression).evaluate(inputDoc, XPathConstants.NODESET); - assertEquals("Number of element ==>", 1, nodes.getLength()); + assertEquals("Number of element ==>", 2, nodes.getLength()); } } diff --git a/liberty-maven-plugin/src/it/ear-project-it/skinnywar-wlp/src/test/java/net/wasdev/wlp/maven/test/it/LooseConfigTestIT.java b/liberty-maven-plugin/src/it/ear-project-it/skinnywar-wlp/src/test/java/net/wasdev/wlp/maven/test/it/LooseConfigTestIT.java index 4e87218e7..e3dc6d632 100644 --- a/liberty-maven-plugin/src/it/ear-project-it/skinnywar-wlp/src/test/java/net/wasdev/wlp/maven/test/it/LooseConfigTestIT.java +++ b/liberty-maven-plugin/src/it/ear-project-it/skinnywar-wlp/src/test/java/net/wasdev/wlp/maven/test/it/LooseConfigTestIT.java @@ -77,10 +77,10 @@ public void testLooseApplicationFileContent() throws Exception { expression = "/archive/archive/dir"; nodes = (NodeList) xPath.compile(expression).evaluate(inputDoc, XPathConstants.NODESET); - assertEquals("Number of element ==>", 3, nodes.getLength()); + assertEquals("Number of element ==>", 2, nodes.getLength()); expression = "/archive/archive/file"; nodes = (NodeList) xPath.compile(expression).evaluate(inputDoc, XPathConstants.NODESET); - assertEquals("Number of element ==>", 1, nodes.getLength()); + assertEquals("Number of element ==>", 2, nodes.getLength()); } } diff --git a/liberty-maven-plugin/src/it/generate-features-it/pom.xml b/liberty-maven-plugin/src/it/generate-features-it/pom.xml index 62d374d2e..823ed94ab 100755 --- a/liberty-maven-plugin/src/it/generate-features-it/pom.xml +++ b/liberty-maven-plugin/src/it/generate-features-it/pom.xml @@ -49,7 +49,7 @@ org.apache.maven.plugins maven-failsafe-plugin - 3.0.0 + 3.1.2 true 1 @@ -85,7 +85,7 @@ org.apache.maven.plugins maven-surefire-plugin - 3.0.0 + 3.1.2 true diff --git a/liberty-maven-plugin/src/it/generate-features-it/resources/basic-dev-project/pom.xml b/liberty-maven-plugin/src/it/generate-features-it/resources/basic-dev-project/pom.xml index 6bca6572a..5534b713b 100755 --- a/liberty-maven-plugin/src/it/generate-features-it/resources/basic-dev-project/pom.xml +++ b/liberty-maven-plugin/src/it/generate-features-it/resources/basic-dev-project/pom.xml @@ -134,7 +134,7 @@ org.apache.maven.plugins maven-war-plugin - 3.3.2 + 3.4.0 false pom.xml @@ -144,7 +144,7 @@ org.apache.maven.plugins maven-surefire-plugin - 3.0.0-M1 + 3.1.2 test @@ -184,7 +184,7 @@ org.apache.maven.plugins maven-failsafe-plugin - 3.0.0-M1 + 3.1.2 integration-test diff --git a/liberty-maven-plugin/src/it/generate-features-it/resources/multi-module-project/ear/pom.xml b/liberty-maven-plugin/src/it/generate-features-it/resources/multi-module-project/ear/pom.xml index 5492681b2..fffc733fc 100644 --- a/liberty-maven-plugin/src/it/generate-features-it/resources/multi-module-project/ear/pom.xml +++ b/liberty-maven-plugin/src/it/generate-features-it/resources/multi-module-project/ear/pom.xml @@ -53,7 +53,7 @@ org.apache.maven.plugins maven-ear-plugin - 3.0.2 + 3.3.0 diff --git a/liberty-maven-plugin/src/it/generate-features-it/resources/multi-module-project/pom/pom.xml b/liberty-maven-plugin/src/it/generate-features-it/resources/multi-module-project/pom/pom.xml index 95b5687de..f371ae709 100644 --- a/liberty-maven-plugin/src/it/generate-features-it/resources/multi-module-project/pom/pom.xml +++ b/liberty-maven-plugin/src/it/generate-features-it/resources/multi-module-project/pom/pom.xml @@ -62,7 +62,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.8.1 + 3.11.0 test-compile @@ -77,7 +77,7 @@ org.apache.maven.plugins maven-failsafe-plugin - 3.0.0-M7 + 3.1.2 diff --git a/liberty-maven-plugin/src/it/generate-features-it/resources/restful/pom.xml b/liberty-maven-plugin/src/it/generate-features-it/resources/restful/pom.xml index 031ddeac0..454264030 100644 --- a/liberty-maven-plugin/src/it/generate-features-it/resources/restful/pom.xml +++ b/liberty-maven-plugin/src/it/generate-features-it/resources/restful/pom.xml @@ -128,7 +128,7 @@ org.apache.maven.plugins maven-war-plugin - 3.2.2 + 3.4.0 false pom.xml @@ -138,7 +138,7 @@ org.apache.maven.plugins maven-surefire-plugin - 2.18.1 + 3.1.2 test @@ -221,7 +221,7 @@ org.apache.maven.plugins maven-failsafe-plugin - 2.18.1 + 3.1.2 integration-test diff --git a/liberty-maven-plugin/src/it/include-from-bootstrap-it/pom.xml b/liberty-maven-plugin/src/it/include-from-bootstrap-it/pom.xml index b1b9a5518..2c5c9724f 100644 --- a/liberty-maven-plugin/src/it/include-from-bootstrap-it/pom.xml +++ b/liberty-maven-plugin/src/it/include-from-bootstrap-it/pom.xml @@ -39,17 +39,17 @@ org.apache.maven.plugins maven-war-plugin - 3.3.2 + 3.4.0 org.apache.maven.plugins maven-failsafe-plugin - 2.5 + 3.1.2 org.apache.maven.plugins maven-surefire-plugin - 2.5 + 3.1.2 diff --git a/liberty-maven-plugin/src/it/install-apps-project-it/pom.xml b/liberty-maven-plugin/src/it/install-apps-project-it/pom.xml index 780596425..2c9d8ca4c 100644 --- a/liberty-maven-plugin/src/it/install-apps-project-it/pom.xml +++ b/liberty-maven-plugin/src/it/install-apps-project-it/pom.xml @@ -39,17 +39,17 @@ org.apache.maven.plugins maven-war-plugin - 3.3.2 + 3.4.0 org.apache.maven.plugins maven-failsafe-plugin - 2.5 + 3.1.2 org.apache.maven.plugins maven-surefire-plugin - 2.5 + 3.1.2 @@ -131,6 +131,7 @@ true true false + false diff --git a/liberty-maven-plugin/src/it/kernel-install-feature-test/install-features-server-it/pom.xml b/liberty-maven-plugin/src/it/kernel-install-feature-test/install-features-server-it/pom.xml index 176744d9e..f821c112c 100644 --- a/liberty-maven-plugin/src/it/kernel-install-feature-test/install-features-server-it/pom.xml +++ b/liberty-maven-plugin/src/it/kernel-install-feature-test/install-features-server-it/pom.xml @@ -16,7 +16,7 @@ maven-resources-plugin - 3.3.0 + 3.3.1 copy-resources diff --git a/liberty-maven-plugin/src/it/kernel-install-feature-test/install-usr-feature-ext-it/pom.xml b/liberty-maven-plugin/src/it/kernel-install-feature-test/install-usr-feature-ext-it/pom.xml index c33058de0..9b2898722 100644 --- a/liberty-maven-plugin/src/it/kernel-install-feature-test/install-usr-feature-ext-it/pom.xml +++ b/liberty-maven-plugin/src/it/kernel-install-feature-test/install-usr-feature-ext-it/pom.xml @@ -16,7 +16,7 @@ maven-resources-plugin - 3.1.0 + 3.3.1 copy-resource-one diff --git a/liberty-maven-plugin/src/it/kernel-install-feature-test/install-usr-feature-ext-it/src/test/java/net/wasdev/wlp/test/feature/it/InstallUsrFeatureToExtTest.java b/liberty-maven-plugin/src/it/kernel-install-feature-test/install-usr-feature-ext-it/src/test/java/net/wasdev/wlp/test/feature/it/InstallUsrFeatureToExtTest.java index 7e5693b31..99a5a2382 100644 --- a/liberty-maven-plugin/src/it/kernel-install-feature-test/install-usr-feature-ext-it/src/test/java/net/wasdev/wlp/test/feature/it/InstallUsrFeatureToExtTest.java +++ b/liberty-maven-plugin/src/it/kernel-install-feature-test/install-usr-feature-ext-it/src/test/java/net/wasdev/wlp/test/feature/it/InstallUsrFeatureToExtTest.java @@ -59,7 +59,7 @@ public void testUsrFeatureExtInstall() throws Exception { assert featureFile.exists() : "testesa1.mf cannot be generated"; } catch (Exception e) { - throw new AssertionError ("Fail to install user feature. "+e); + throw new AssertionError ("Fail to install user feature.", e); } } diff --git a/liberty-maven-plugin/src/it/kernel-install-feature-test/install-usr-feature-old-version/pom.xml b/liberty-maven-plugin/src/it/kernel-install-feature-test/install-usr-feature-old-version/pom.xml index bb11b4d6a..8f741fe41 100644 --- a/liberty-maven-plugin/src/it/kernel-install-feature-test/install-usr-feature-old-version/pom.xml +++ b/liberty-maven-plugin/src/it/kernel-install-feature-test/install-usr-feature-old-version/pom.xml @@ -16,7 +16,7 @@ maven-resources-plugin - 3.1.0 + 3.3.1 copy-resource diff --git a/liberty-maven-plugin/src/it/kernel-install-feature-test/install-usr-feature-old-version/src/test/java/net/wasdev/wlp/test/feature/it/InstallUsrFeatureOld.java b/liberty-maven-plugin/src/it/kernel-install-feature-test/install-usr-feature-old-version/src/test/java/net/wasdev/wlp/test/feature/it/InstallUsrFeatureOld.java index 972a05821..092e20e7f 100644 --- a/liberty-maven-plugin/src/it/kernel-install-feature-test/install-usr-feature-old-version/src/test/java/net/wasdev/wlp/test/feature/it/InstallUsrFeatureOld.java +++ b/liberty-maven-plugin/src/it/kernel-install-feature-test/install-usr-feature-old-version/src/test/java/net/wasdev/wlp/test/feature/it/InstallUsrFeatureOld.java @@ -48,7 +48,7 @@ public void testUsrFeatureInstallOld() throws Exception { assert featureFile.exists() : "testesa1.mf cannot be generated"; } catch (Exception e) { - throw new AssertionError ("Fail to install user feature. "+e); + throw new AssertionError ("Fail to install user feature.", e); } } diff --git a/liberty-maven-plugin/src/it/kernel-install-feature-test/pom.xml b/liberty-maven-plugin/src/it/kernel-install-feature-test/pom.xml index effd1728d..6f9286ecc 100755 --- a/liberty-maven-plugin/src/it/kernel-install-feature-test/pom.xml +++ b/liberty-maven-plugin/src/it/kernel-install-feature-test/pom.xml @@ -95,7 +95,7 @@ org.apache.maven.plugins maven-failsafe-plugin - 3.0.0-M7 + 3.1.2 true once @@ -125,7 +125,7 @@ org.apache.maven.plugins maven-surefire-plugin - 3.0.0-M7 + 3.1.2 true diff --git a/liberty-maven-plugin/src/it/kernel-install-feature-test/prepare-feature-it/pom.xml b/liberty-maven-plugin/src/it/kernel-install-feature-test/prepare-feature-it/pom.xml index 63119a462..cc00c51df 100644 --- a/liberty-maven-plugin/src/it/kernel-install-feature-test/prepare-feature-it/pom.xml +++ b/liberty-maven-plugin/src/it/kernel-install-feature-test/prepare-feature-it/pom.xml @@ -16,7 +16,7 @@ maven-resources-plugin - 3.1.0 + 3.3.1 copy-resource-one diff --git a/liberty-maven-plugin/src/it/kernel-install-feature-test/prepare-feature-it/src/test/java/net/wasdev/wlp/test/feature/it/PrepareFeatureTest.java b/liberty-maven-plugin/src/it/kernel-install-feature-test/prepare-feature-it/src/test/java/net/wasdev/wlp/test/feature/it/PrepareFeatureTest.java index 51c14ba26..ef763f6f1 100644 --- a/liberty-maven-plugin/src/it/kernel-install-feature-test/prepare-feature-it/src/test/java/net/wasdev/wlp/test/feature/it/PrepareFeatureTest.java +++ b/liberty-maven-plugin/src/it/kernel-install-feature-test/prepare-feature-it/src/test/java/net/wasdev/wlp/test/feature/it/PrepareFeatureTest.java @@ -59,7 +59,7 @@ public void testPrepareFeature() throws Exception { assert jsonFile.exists() : "features.json cannot be generated"; } catch (Exception e) { - throw new AssertionError ("Fail on task prepareFeature. "+e); + throw new AssertionError ("Fail on task prepareFeature.", e); } } @@ -71,7 +71,7 @@ public void testUsrFeatureInstall() throws Exception { assert featureFile.exists() : "testesa1.mf cannot be generated"; } catch (Exception e) { - throw new AssertionError ("Fail to install user feature. "+e); + throw new AssertionError ("Fail to install user feature.", e); } } diff --git a/liberty-maven-plugin/src/it/kernel-install-feature-test/prepare-multiple-features-it/pom.xml b/liberty-maven-plugin/src/it/kernel-install-feature-test/prepare-multiple-features-it/pom.xml index a307f5118..10d07523c 100644 --- a/liberty-maven-plugin/src/it/kernel-install-feature-test/prepare-multiple-features-it/pom.xml +++ b/liberty-maven-plugin/src/it/kernel-install-feature-test/prepare-multiple-features-it/pom.xml @@ -16,7 +16,7 @@ maven-resources-plugin - 3.1.0 + 3.3.1 copy-resource-one diff --git a/liberty-maven-plugin/src/it/kernel-install-feature-test/prepare-multiple-features-it/src/test/java/net/wasdev/wlp/test/feature/it/PrepareMultipleFeatureTest.java b/liberty-maven-plugin/src/it/kernel-install-feature-test/prepare-multiple-features-it/src/test/java/net/wasdev/wlp/test/feature/it/PrepareMultipleFeatureTest.java index 5ad714b3f..b9adc912e 100644 --- a/liberty-maven-plugin/src/it/kernel-install-feature-test/prepare-multiple-features-it/src/test/java/net/wasdev/wlp/test/feature/it/PrepareMultipleFeatureTest.java +++ b/liberty-maven-plugin/src/it/kernel-install-feature-test/prepare-multiple-features-it/src/test/java/net/wasdev/wlp/test/feature/it/PrepareMultipleFeatureTest.java @@ -59,7 +59,7 @@ public void testPrepareFeature() throws Exception { assert jsonFile.exists() : "features.json cannot be generated"; } catch (Exception e) { - throw new AssertionError ("Fail on task prepareFeature. "+e); + throw new AssertionError ("Fail on task prepareFeature.", e); } } @@ -73,7 +73,7 @@ public void testMultipleUsrFeatureInstall() throws Exception { assert simpleFile.exists() : "SimpleActivator.mf cannot be generated"; } catch (Exception e) { - throw new AssertionError ("Fail to install user features. "+e); + throw new AssertionError ("Fail to install user features.", e); } } diff --git a/liberty-maven-plugin/src/it/loose-config-it/pom.xml b/liberty-maven-plugin/src/it/loose-config-it/pom.xml index 6f4fde6e0..a3e696cb0 100644 --- a/liberty-maven-plugin/src/it/loose-config-it/pom.xml +++ b/liberty-maven-plugin/src/it/loose-config-it/pom.xml @@ -50,7 +50,7 @@ org.apache.maven.plugins maven-war-plugin - 3.3.2 + 3.4.0 false pom.xml @@ -126,6 +126,7 @@ true true false + false @@ -133,7 +134,7 @@ org.apache.maven.plugins maven-failsafe-plugin - 2.19.1 + 3.1.2 true once @@ -163,7 +164,7 @@ org.apache.maven.plugins maven-surefire-plugin - 2.19.1 + 3.1.2 true diff --git a/liberty-maven-plugin/src/it/loose-war-ejb-it/ejb/pom.xml b/liberty-maven-plugin/src/it/loose-war-ejb-it/ejb/pom.xml index d6e6bf12c..fbe8bafac 100644 --- a/liberty-maven-plugin/src/it/loose-war-ejb-it/ejb/pom.xml +++ b/liberty-maven-plugin/src/it/loose-war-ejb-it/ejb/pom.xml @@ -34,7 +34,7 @@ org.apache.maven.plugins maven-ejb-plugin - 3.1.0 + 3.2.1 3.1 diff --git a/liberty-maven-plugin/src/it/loose-war-ejb-it/war/pom.xml b/liberty-maven-plugin/src/it/loose-war-ejb-it/war/pom.xml index f931b40d2..8cd35655c 100644 --- a/liberty-maven-plugin/src/it/loose-war-ejb-it/war/pom.xml +++ b/liberty-maven-plugin/src/it/loose-war-ejb-it/war/pom.xml @@ -43,7 +43,7 @@ org.apache.maven.plugins maven-war-plugin - 3.3.2 + 3.4.0 false pom.xml @@ -85,7 +85,7 @@ org.apache.maven.plugins maven-failsafe-plugin - 2.19.1 + 3.1.2 true once @@ -106,7 +106,7 @@ org.apache.maven.plugins maven-surefire-plugin - 3.0.0-M5 + 3.1.2 true diff --git a/liberty-maven-plugin/src/it/loose-war-ejb-type-it/ejb/pom.xml b/liberty-maven-plugin/src/it/loose-war-ejb-type-it/ejb/pom.xml index 20ba82748..ba4e64738 100644 --- a/liberty-maven-plugin/src/it/loose-war-ejb-type-it/ejb/pom.xml +++ b/liberty-maven-plugin/src/it/loose-war-ejb-type-it/ejb/pom.xml @@ -34,7 +34,7 @@ org.apache.maven.plugins maven-ejb-plugin - 3.1.0 + 3.2.1 3.1 diff --git a/liberty-maven-plugin/src/it/loose-war-ejb-type-it/war/pom.xml b/liberty-maven-plugin/src/it/loose-war-ejb-type-it/war/pom.xml index 706ac74a1..d75ccda23 100644 --- a/liberty-maven-plugin/src/it/loose-war-ejb-type-it/war/pom.xml +++ b/liberty-maven-plugin/src/it/loose-war-ejb-type-it/war/pom.xml @@ -44,7 +44,7 @@ org.apache.maven.plugins maven-war-plugin - 3.3.2 + 3.4.0 false pom.xml @@ -86,7 +86,7 @@ org.apache.maven.plugins maven-failsafe-plugin - 2.19.1 + 3.1.2 true once @@ -107,7 +107,7 @@ org.apache.maven.plugins maven-surefire-plugin - 3.0.0-M5 + 3.1.2 true diff --git a/liberty-maven-plugin/src/it/merge-server-env-it/pom.xml b/liberty-maven-plugin/src/it/merge-server-env-it/pom.xml index a198f47a3..d6475ba34 100644 --- a/liberty-maven-plugin/src/it/merge-server-env-it/pom.xml +++ b/liberty-maven-plugin/src/it/merge-server-env-it/pom.xml @@ -38,17 +38,17 @@ org.apache.maven.plugins maven-war-plugin - 3.3.2 + 3.4.0 org.apache.maven.plugins maven-failsafe-plugin - 2.5 + 3.1.2 org.apache.maven.plugins maven-surefire-plugin - 2.5 + 3.1.2 @@ -135,6 +135,7 @@ true true false + false diff --git a/liberty-maven-plugin/src/it/merge-server-env-none-it/pom.xml b/liberty-maven-plugin/src/it/merge-server-env-none-it/pom.xml index 4a013e2eb..48c394462 100644 --- a/liberty-maven-plugin/src/it/merge-server-env-none-it/pom.xml +++ b/liberty-maven-plugin/src/it/merge-server-env-none-it/pom.xml @@ -33,17 +33,17 @@ org.apache.maven.plugins maven-war-plugin - 3.3.2 + 3.4.0 org.apache.maven.plugins maven-failsafe-plugin - 2.5 + 3.1.2 org.apache.maven.plugins maven-surefire-plugin - 2.5 + 3.1.2 @@ -127,6 +127,7 @@ true true false + false diff --git a/liberty-maven-plugin/src/it/package-type-config-it/pom.xml b/liberty-maven-plugin/src/it/package-type-config-it/pom.xml index 104209da2..0f6e75a51 100644 --- a/liberty-maven-plugin/src/it/package-type-config-it/pom.xml +++ b/liberty-maven-plugin/src/it/package-type-config-it/pom.xml @@ -48,7 +48,7 @@ org.apache.maven.plugins maven-war-plugin - 3.3.2 + 3.4.0 false pom.xml @@ -78,7 +78,7 @@ org.apache.maven.plugins maven-failsafe-plugin - 2.19.1 + 3.1.2 true once @@ -108,7 +108,7 @@ org.apache.maven.plugins maven-surefire-plugin - 2.19.1 + 3.1.2 true @@ -132,7 +132,7 @@ org.apache.maven.plugins maven-failsafe-plugin - 2.19.1 + 3.1.2 **/PackageTypeJarTest.java @@ -158,7 +158,7 @@ org.apache.maven.plugins maven-failsafe-plugin - 2.19.1 + 3.1.2 **/PackageTypeRunnableJarTest.java @@ -183,7 +183,7 @@ org.apache.maven.plugins maven-failsafe-plugin - 2.19.1 + 3.1.2 **/PackageTypeZipTest.java @@ -208,7 +208,7 @@ org.apache.maven.plugins maven-failsafe-plugin - 2.19.1 + 3.1.2 **/PackageTypeTarTest.java @@ -233,7 +233,7 @@ org.apache.maven.plugins maven-failsafe-plugin - 2.19.1 + 3.1.2 **/PackageTypeTarGzTest.java diff --git a/liberty-maven-plugin/src/it/preserve-usr-dir-it/pom.xml b/liberty-maven-plugin/src/it/preserve-usr-dir-it/pom.xml index 044cc06c4..951b14d26 100644 --- a/liberty-maven-plugin/src/it/preserve-usr-dir-it/pom.xml +++ b/liberty-maven-plugin/src/it/preserve-usr-dir-it/pom.xml @@ -39,7 +39,7 @@ org.apache.maven.plugins maven-failsafe-plugin - 2.19.1 + 3.1.2 @@ -52,7 +52,7 @@ org.apache.maven.plugins maven-dependency-plugin - 3.0.0 + 3.6.0 diff --git a/liberty-maven-plugin/src/it/server-config-props-it/pom.xml b/liberty-maven-plugin/src/it/server-config-props-it/pom.xml index cf87b4a23..bb123040f 100644 --- a/liberty-maven-plugin/src/it/server-config-props-it/pom.xml +++ b/liberty-maven-plugin/src/it/server-config-props-it/pom.xml @@ -74,7 +74,7 @@ org.apache.maven.plugins maven-war-plugin - 3.3.2 + 3.4.0 false pom.xml @@ -122,7 +122,7 @@ org.apache.maven.plugins maven-failsafe-plugin - 2.19.1 + 3.1.2 true once diff --git a/liberty-maven-plugin/src/it/server-param-configdir-not-override-it/pom.xml b/liberty-maven-plugin/src/it/server-param-configdir-not-override-it/pom.xml index b0b5676ba..fbab394b7 100644 --- a/liberty-maven-plugin/src/it/server-param-configdir-not-override-it/pom.xml +++ b/liberty-maven-plugin/src/it/server-param-configdir-not-override-it/pom.xml @@ -32,7 +32,7 @@ org.apache.maven.plugins maven-war-plugin - 3.3.2 + 3.4.0 false @@ -63,7 +63,7 @@ org.apache.maven.plugins maven-failsafe-plugin - 2.19.1 + 3.1.2 diff --git a/liberty-maven-plugin/src/it/server-param-default-it/pom.xml b/liberty-maven-plugin/src/it/server-param-default-it/pom.xml index 6945c88ed..52b275c37 100644 --- a/liberty-maven-plugin/src/it/server-param-default-it/pom.xml +++ b/liberty-maven-plugin/src/it/server-param-default-it/pom.xml @@ -38,7 +38,7 @@ org.apache.maven.plugins maven-war-plugin - 3.3.2 + 3.4.0 org.codehaus.mojo @@ -64,7 +64,7 @@ org.apache.maven.plugins maven-antrun-plugin - 1.5 + 3.1.0 + someBootstrapValue + -javaagent:/path/to/some/jar.jar + @{myArgLine} + @{undefined} -Xms512m + -Xmx1024m pom.xml /opt/ibm/java @@ -51,7 +55,7 @@ org.apache.maven.plugins maven-war-plugin - 3.3.2 + 3.4.0 io.openliberty.tools @@ -67,6 +71,10 @@ -Xmx768m + + @{myBootstrapArg} + @{undefinedValue} + test src/test/resources/server.xml src/main/liberty/config/bootstrap.properties @@ -80,7 +88,7 @@ org.apache.maven.plugins maven-failsafe-plugin - 2.19.1 + 3.1.2 diff --git a/liberty-maven-plugin/src/it/server-param-pom-override-it/src/test/java/net/wasdev/wlp/maven/test/app/PluginConfigXmlIT.java b/liberty-maven-plugin/src/it/server-param-pom-override-it/src/test/java/net/wasdev/wlp/maven/test/app/PluginConfigXmlIT.java index 2a3ef0dd2..172ce7a03 100644 --- a/liberty-maven-plugin/src/it/server-param-pom-override-it/src/test/java/net/wasdev/wlp/maven/test/app/PluginConfigXmlIT.java +++ b/liberty-maven-plugin/src/it/server-param-pom-override-it/src/test/java/net/wasdev/wlp/maven/test/app/PluginConfigXmlIT.java @@ -15,7 +15,7 @@ import org.w3c.dom.NodeList; import org.w3c.dom.Element; -import static junit.framework.Assert.*; +import static org.junit.Assert.*; public class PluginConfigXmlIT { @@ -96,8 +96,33 @@ public void testBootstrapPropertiesFileElements() throws Exception { nodes = (NodeList) xPath.compile(expression).evaluate(inputDoc, XPathConstants.NODESET); assertEquals("Number of bootstrapProperties element ==>", 1, nodes.getLength()); - assertEquals("verify target server bootstrap.properties", "# Generated by liberty-maven-plugin\nlocation=pom.xml\n", - FileUtils.fileRead(TARGET_BOOTSTRAP_PROPERTIES).replaceAll("\r","")); + String fileContents = FileUtils.fileRead(TARGET_BOOTSTRAP_PROPERTIES).replaceAll("\r",""); + + String[] fileContentsArray = fileContents.split("\\n"); + assertTrue("fileContents", fileContentsArray.length == 4); + + boolean someBootstrapVarFound = false; + boolean locationFound = false; + boolean someUndefinedBootstrapVarFound = false; + + for (int i=0; i < fileContentsArray.length; i++) { + String nextLine = fileContentsArray[i]; + if (i == 0) { + assertTrue("comment not found on first line", nextLine.equals("# Generated by liberty-maven-plugin")); + } else { + if (nextLine.equals("someBootstrapVar=someBootstrapValue")) { + someBootstrapVarFound = true; + } else if (nextLine.equals("location=pom.xml")) { + locationFound = true; + } else if (nextLine.equals("someUndefinedBootstrapVar=@{undefinedValue}")) { + someUndefinedBootstrapVarFound = true; + } + } + } + + assertTrue("someBootstrapVar=someBootstrapValue not found", someBootstrapVarFound); + assertTrue("location=pom.xml not found", locationFound); + assertTrue("someUndefinedBootstrapVar=@{undefinedValue} not found", someUndefinedBootstrapVarFound); } @Test @@ -126,8 +151,39 @@ public void testJvmOptionsFileElements() throws Exception { String fileContents = FileUtils.fileRead(TARGET_JVM_OPTIONS).replaceAll("\r",""); - // verify that -Xmx768m is last in the jvm.options file, and that -Xms512m and -Xmx1024m appear before it. - assertTrue("verify target server jvm.options", fileContents.equals( "# Generated by liberty-maven-plugin\n-Xms512m\n-Xmx1024m\n-Xmx768m\n") || fileContents.equals("# Generated by liberty-maven-plugin\n-Xmx1024m\n-Xms512m\n-Xmx768m\n")); + String[] fileContentsArray = fileContents.split("\\n"); + assertTrue("fileContents", fileContentsArray.length == 6); + + boolean myArgLineValueFound = false; + boolean myXms512mFound = false; + boolean myXmx1024mFound = false; + boolean myUndefinedVarFound = false; + + for (int i=0; i < fileContentsArray.length; i++) { + String nextLine = fileContentsArray[i]; + // verify that -Xmx768m is last in the jvm.options file, and that -Xms512m and -Xmx1024m appear before it. + if (i == 0) { + assertTrue("comment not found on first line", nextLine.equals("# Generated by liberty-maven-plugin")); + } else if (i == 5) { + assertTrue("-Xmx768m not found on last line", nextLine.equals("-Xmx768m")); + } else { + if (nextLine.equals("-Xms512m")) { + myXms512mFound = true; + } else if (nextLine.equals("-Xmx1024m")) { + myXmx1024mFound = true; + } else if (nextLine.equals("-javaagent:/path/to/some/jar.jar")) { + myArgLineValueFound = true; + } else if (nextLine.equals("@{undefined}")) { + myUndefinedVarFound = true; + } + } + } + + assertTrue("-Xms512m not found", myXms512mFound); + assertTrue("-Xmx1024m not found", myXmx1024mFound); + assertTrue("-javaagent:/path/to/some/jar.jar not found", myArgLineValueFound); + assertTrue("@{undefined} not found", myUndefinedVarFound); + } @Test diff --git a/liberty-maven-plugin/src/it/setup/assembly-server/pom.xml b/liberty-maven-plugin/src/it/setup/assembly-server/pom.xml index 63a9699d6..005b76491 100644 --- a/liberty-maven-plugin/src/it/setup/assembly-server/pom.xml +++ b/liberty-maven-plugin/src/it/setup/assembly-server/pom.xml @@ -24,12 +24,12 @@ org.apache.maven.plugins maven-antrun-plugin - 1.7 + 3.1.0 org.apache.maven.plugins maven-install-plugin - 2.4 + 3.1.1 io.openliberty.tools diff --git a/liberty-maven-plugin/src/it/setup/test-war/pom.xml b/liberty-maven-plugin/src/it/setup/test-war/pom.xml index 351fcb388..70a4544f1 100644 --- a/liberty-maven-plugin/src/it/setup/test-war/pom.xml +++ b/liberty-maven-plugin/src/it/setup/test-war/pom.xml @@ -30,12 +30,12 @@ org.apache.maven.plugins maven-war-plugin - 3.3.2 + 3.4.0 org.apache.felix maven-bundle-plugin - 2.3.7 + 5.1.9 diff --git a/liberty-maven-plugin/src/it/springboot-tests/springboot-appsdirectory-apps-it/pom.xml b/liberty-maven-plugin/src/it/springboot-tests/springboot-appsdirectory-apps-it/pom.xml index 3c4cdfc69..38db0310c 100644 --- a/liberty-maven-plugin/src/it/springboot-tests/springboot-appsdirectory-apps-it/pom.xml +++ b/liberty-maven-plugin/src/it/springboot-tests/springboot-appsdirectory-apps-it/pom.xml @@ -132,7 +132,7 @@ maven-failsafe-plugin - 3.0.0-M1 + 3.1.2 alphabetical diff --git a/liberty-maven-plugin/src/it/springboot-tests/springboot-appsdirectory-dropins-it/pom.xml b/liberty-maven-plugin/src/it/springboot-tests/springboot-appsdirectory-dropins-it/pom.xml index 0c7383a48..38e7b1fe5 100644 --- a/liberty-maven-plugin/src/it/springboot-tests/springboot-appsdirectory-dropins-it/pom.xml +++ b/liberty-maven-plugin/src/it/springboot-tests/springboot-appsdirectory-dropins-it/pom.xml @@ -127,7 +127,7 @@ maven-failsafe-plugin - 3.0.0-M1 + 3.1.2 alphabetical diff --git a/liberty-maven-plugin/src/main/java/io/openliberty/tools/maven/InstallFeatureSupport.java b/liberty-maven-plugin/src/main/java/io/openliberty/tools/maven/InstallFeatureSupport.java index 1b4da99a8..db13a1416 100644 --- a/liberty-maven-plugin/src/main/java/io/openliberty/tools/maven/InstallFeatureSupport.java +++ b/liberty-maven-plugin/src/main/java/io/openliberty/tools/maven/InstallFeatureSupport.java @@ -201,7 +201,7 @@ else if (util == null && !noFeaturesSection) { else { Set dependencyFeatures = getDependencyFeatures(); Set serverFeatures = serverDirectory.exists() ? util.getServerFeatures(serverDirectory, getLibertyDirectoryPropertyFiles()) : null; - return InstallFeatureUtil.combineToSet(pluginListedFeatures, dependencyFeatures, serverFeatures); + return util.combineToSet(pluginListedFeatures, dependencyFeatures, serverFeatures); } } diff --git a/liberty-maven-plugin/src/main/java/io/openliberty/tools/maven/applications/DeployMojoSupport.java b/liberty-maven-plugin/src/main/java/io/openliberty/tools/maven/applications/DeployMojoSupport.java index 5ff4f6b6e..b8a0b4bc0 100644 --- a/liberty-maven-plugin/src/main/java/io/openliberty/tools/maven/applications/DeployMojoSupport.java +++ b/liberty-maven-plugin/src/main/java/io/openliberty/tools/maven/applications/DeployMojoSupport.java @@ -235,6 +235,9 @@ protected void installLooseConfigEar(MavenProject proj, LooseConfigData config, case "ejb": looseEar.addEjbModule(dependencyProject, artifact); break; + case "bundle": + looseEar.addBundleModule(dependencyProject, artifact); + break; case "war": Element warArchive = looseEar.addWarModule(dependencyProject, artifact, getWarSourceDirectory(dependencyProject)); @@ -326,7 +329,8 @@ private void addSkinnyWarLib(Element parent, MavenProject warProject, LooseEarAp // skip the embedded library if it is included in the lib directory of the ear // package if (("compile".equals(artifact.getScope()) || "runtime".equals(artifact.getScope())) - && "jar".equals(artifact.getType()) && !looseEar.isEarDependency(artifact)) { + && ("jar".equals(artifact.getType()) || "jar".equals(artifact.getArtifactHandler().getExtension())) + && !looseEar.isEarDependency(artifact)) { addLibrary(parent, looseEar, "/WEB-INF/lib/", artifact); } } @@ -340,8 +344,14 @@ private void addLibrary(Element parent, LooseApplication looseApp, String dir, A Element archive = looseApp.addArchive(parent, dir + artifactFileName); looseApp.addOutputDir(archive, new File(dependProject.getBuild().getOutputDirectory()), "/"); - //Check if reactor project generates an ejb or jar - String archivePlugin = dependProject.getPackaging().equalsIgnoreCase("ejb") ? "maven-ejb-plugin" : "maven-jar-plugin"; + //Check if reactor project generates an ejb, bundle or jar + String archivePlugin = "maven-jar-plugin"; + String packaging = dependProject.getPackaging(); + if (packaging.equalsIgnoreCase("ejb")) { + archivePlugin = "maven-ejb-plugin"; + } else if (packaging.equalsIgnoreCase("bundle")) { + archivePlugin = "maven-bundle-plugin"; + } File manifestFile = MavenProjectUtil.getManifestFile(dependProject, archivePlugin); diff --git a/liberty-maven-plugin/src/main/java/io/openliberty/tools/maven/applications/LooseEarApplication.java b/liberty-maven-plugin/src/main/java/io/openliberty/tools/maven/applications/LooseEarApplication.java index f56e77e45..4285b4767 100644 --- a/liberty-maven-plugin/src/main/java/io/openliberty/tools/maven/applications/LooseEarApplication.java +++ b/liberty-maven-plugin/src/main/java/io/openliberty/tools/maven/applications/LooseEarApplication.java @@ -75,6 +75,10 @@ public Element addEjbModule(MavenProject proj, Artifact artifact) throws MojoExe return addModule(proj, artifact, "maven-ejb-plugin"); } + public Element addBundleModule(MavenProject proj, Artifact artifact) throws MojoExecutionException, IOException { + return addModule(proj, artifact, "maven-bundle-plugin"); + } + public Element addModule(MavenProject proj, Artifact artifact, String pluginId) throws MojoExecutionException, IOException { File outputDirectory = new File(proj.getBuild().getOutputDirectory()); Element moduleArchive = config.addArchive(getModuleUri(artifact)); diff --git a/liberty-maven-plugin/src/main/java/io/openliberty/tools/maven/server/LooseAppSupport.java b/liberty-maven-plugin/src/main/java/io/openliberty/tools/maven/server/LooseAppSupport.java index 9ed7e3b07..c5aee7a70 100644 --- a/liberty-maven-plugin/src/main/java/io/openliberty/tools/maven/server/LooseAppSupport.java +++ b/liberty-maven-plugin/src/main/java/io/openliberty/tools/maven/server/LooseAppSupport.java @@ -56,12 +56,13 @@ protected String getAppFileName(MavenProject project, boolean stripVersionIfConf name += "-" + classifier; } - if (project.getPackaging().equals("liberty-assembly")) { + String packagingType = project.getPackaging(); + if (packagingType.equals("liberty-assembly")) { name += ".war"; - } else if (project.getPackaging().equals("ejb")) { + } else if (packagingType.equals("ejb") || packagingType.equals("bundle")) { name += ".jar"; } else { - name += "." + project.getPackaging(); + name += "." + packagingType; } return name; diff --git a/liberty-maven-plugin/src/main/java/io/openliberty/tools/maven/server/PluginConfigSupport.java b/liberty-maven-plugin/src/main/java/io/openliberty/tools/maven/server/PluginConfigSupport.java index 1b16fe83a..becefe411 100644 --- a/liberty-maven-plugin/src/main/java/io/openliberty/tools/maven/server/PluginConfigSupport.java +++ b/liberty-maven-plugin/src/main/java/io/openliberty/tools/maven/server/PluginConfigSupport.java @@ -120,7 +120,10 @@ protected File exportParametersToXml() throws IOException, ParserConfigurationEx if (combinedBootstrapProperties != null) { configDocument.createElement("bootstrapProperties", combinedBootstrapProperties); } else if (bootstrapProperties != null) { - configDocument.createElement("bootstrapProperties", bootstrapProperties); + if (bootstrapPropertiesResolved == null) { + bootstrapPropertiesResolved = handleLatePropertyResolution(bootstrapProperties); + } + configDocument.createElement("bootstrapProperties", bootstrapPropertiesResolved); } else { configFile = findConfigFile("bootstrap.properties", bootstrapPropertiesFile); if (configFile != null) { @@ -131,7 +134,10 @@ protected File exportParametersToXml() throws IOException, ParserConfigurationEx if (combinedJvmOptions != null) { configDocument.createElement("jvmOptions", combinedJvmOptions); } else if (jvmOptions != null) { - configDocument.createElement("jvmOptions", jvmOptions); + if (jvmOptionsResolved == null) { + jvmOptionsResolved = handleLatePropertyResolution(jvmOptions); + } + configDocument.createElement("jvmOptions", jvmOptionsResolved); } else { configFile = findConfigFile("jvm.options", jvmOptionsFile); if (configFile != null) { diff --git a/liberty-maven-plugin/src/main/java/io/openliberty/tools/maven/server/RunServerMojo.java b/liberty-maven-plugin/src/main/java/io/openliberty/tools/maven/server/RunServerMojo.java index 2d7a0d057..9cb34a58b 100644 --- a/liberty-maven-plugin/src/main/java/io/openliberty/tools/maven/server/RunServerMojo.java +++ b/liberty-maven-plugin/src/main/java/io/openliberty/tools/maven/server/RunServerMojo.java @@ -107,6 +107,9 @@ private void doRunServer() throws MojoExecutionException { case "ejb": runMojo("org.apache.maven.plugins", "maven-ejb-plugin", "ejb"); break; + case "bundle": + runMojo("org.apache.felix", "maven-bundle-plugin", "bundle"); + break; case "jar": runMojo("org.apache.maven.plugins", "maven-jar-plugin", "jar"); break; diff --git a/liberty-maven-plugin/src/main/java/io/openliberty/tools/maven/server/StartDebugMojoSupport.java b/liberty-maven-plugin/src/main/java/io/openliberty/tools/maven/server/StartDebugMojoSupport.java index b297e0615..4199d251f 100644 --- a/liberty-maven-plugin/src/main/java/io/openliberty/tools/maven/server/StartDebugMojoSupport.java +++ b/liberty-maven-plugin/src/main/java/io/openliberty/tools/maven/server/StartDebugMojoSupport.java @@ -82,6 +82,8 @@ public abstract class StartDebugMojoSupport extends ServerFeatureSupport { protected static final String HEADER = "# Generated by liberty-maven-plugin"; private static final String LIBERTY_CONFIG_MAVEN_PROPS = "(^liberty\\.(env|jvm|bootstrap|var|defaultVar)\\.).+"; private static final Pattern pattern = Pattern.compile(LIBERTY_CONFIG_MAVEN_PROPS); + private static final String LATE_PROP_RESOLUTION_SYNTAX = "@\\{(.+?)\\}"; + private static final Pattern LATE_PROP_PATTERN = Pattern.compile(LATE_PROP_RESOLUTION_SYNTAX); private static boolean configFilesCopied = false; @@ -97,6 +99,10 @@ public abstract class StartDebugMojoSupport extends ServerFeatureSupport { protected Map combinedBootstrapProperties = null; protected List combinedJvmOptions = null; + // the following collections are copies of the originals with any @{xxx} references resolved in the values + protected Map bootstrapPropertiesResolved = null; // original collection is bootstrapProperties + protected List jvmOptionsResolved = null; // original collection is jvmOptions + @Component protected BuildPluginManager pluginManager; @@ -553,7 +559,8 @@ protected void copyConfigFiles() throws IOException, MojoExecutionException { if (jvmOptionsPath != null) { getLog().warn("The " + jvmOptionsPath + " file is overwritten by inlined configuration."); } - writeJvmOptions(optionsFile, jvmOptions, jvmMavenProps); + jvmOptionsResolved = handleLatePropertyResolution(jvmOptions); + writeJvmOptions(optionsFile, jvmOptionsResolved, jvmMavenProps); jvmOptionsPath = "inlined configuration"; } else if (jvmOptionsFile != null && jvmOptionsFile.exists()) { if (jvmOptionsPath != null) { @@ -580,7 +587,8 @@ protected void copyConfigFiles() throws IOException, MojoExecutionException { if (bootStrapPropertiesPath != null) { getLog().warn("The " + bootStrapPropertiesPath + " file is overwritten by inlined configuration."); } - writeBootstrapProperties(bootstrapFile, bootstrapProperties, bootstrapMavenProps); + bootstrapPropertiesResolved = handleLatePropertyResolution(bootstrapProperties); + writeBootstrapProperties(bootstrapFile, bootstrapPropertiesResolved, bootstrapMavenProps); bootStrapPropertiesPath = "inlined configuration"; } else if (bootstrapPropertiesFile != null && bootstrapPropertiesFile.exists()) { if (bootStrapPropertiesPath != null) { @@ -796,6 +804,9 @@ private void loadLibertyConfigFromProperties(Properties props) { if (propType != null) { String suffix = key.substring(propType.getPrefix().length()); String value = (String) entry.getValue(); + // Check the value for late property resolution with @{xxx} syntax. + value = resolveLatePropertyReferences(value); + getLog().debug("Processing Liberty configuration from property with key "+key+" and value "+value); switch (propType) { case ENV: envMavenProps.put(suffix, value); @@ -813,6 +824,51 @@ private void loadLibertyConfigFromProperties(Properties props) { } } + // Search the value parameter for any properties referenced with @{xxx} syntax and replace those with their property value if defined. + private String resolveLatePropertyReferences(String value) { + String returnValue = value; + + if (value != null) { + Matcher m = LATE_PROP_PATTERN.matcher(value); + while (m.find()) { + String varName = m.group(1); + if (project.getProperties().containsKey(varName)) { + String replacementValue = project.getProperties().getProperty(varName); + if (replacementValue != null) { + returnValue = returnValue.replace("@{"+varName+"}", replacementValue); + getLog().debug("Replaced Liberty configuration property value @{"+varName+"} with value "+replacementValue); + } + } + } + } + + return returnValue; + } + + protected Map handleLatePropertyResolution(Map properties) { + Map propertiesResolved = null; + if (properties != null) { + propertiesResolved = new HashMap (); + for (Map.Entry entry : properties.entrySet()) { + String value = resolveLatePropertyReferences(entry.getValue()); + propertiesResolved.put(entry.getKey(), value); + } + } + return propertiesResolved; + } + + protected List handleLatePropertyResolution(List properties) { + List propertiesResolved = null; + if (properties != null) { + propertiesResolved = new ArrayList (); + for (String nextOption : properties) { + String value = resolveLatePropertyReferences(nextOption); + propertiesResolved.add(value); + } + } + return propertiesResolved; + } + // The properties parameter comes from the configuration in pom.xml and takes precedence over // the mavenProperties parameter, which comes from generic maven configuration. // One of the passed in Maps must be not null and not empty diff --git a/liberty-maven-plugin/src/main/java/io/openliberty/tools/maven/utils/ExecuteMojoUtil.java b/liberty-maven-plugin/src/main/java/io/openliberty/tools/maven/utils/ExecuteMojoUtil.java index f45857b03..2627503b3 100644 --- a/liberty-maven-plugin/src/main/java/io/openliberty/tools/maven/utils/ExecuteMojoUtil.java +++ b/liberty-maven-plugin/src/main/java/io/openliberty/tools/maven/utils/ExecuteMojoUtil.java @@ -165,6 +165,13 @@ public class ExecuteMojoUtil { "clientIncludes", "ejbJar", "ejbVersion", "escapeBackslashesInFilePath", "escapeString", "excludes", "filterDeploymentDescriptor", "filters", "generateClient", "outputTimestamp")); + // https://felix.apache.org/documentation/_attachments/components/bundle-plugin/bundle-mojo.html + private static final ArrayList BUNDLE_PARAMS = new ArrayList<>( + Arrays.asList("archive", "buildDirectory", "classifier", "createDependencyReducedPom", "dependencyReducedPomLocation", + "dumpClasspath", "dumpInstructions", "excludeDependencies", "exportScr", "finalName", "instructions", + "manifestLocation", "niceManifest", "noWarningProjectTypes", "outputDirectory", "packaging", "scrLocation", + "supportedProjectTypes", "unpackbundle")); + // https://maven.apache.org/plugins/maven-war-plugin/war-mojo.html private static final ArrayList WAR_PARAMS = new ArrayList<>(Arrays.asList("outputDirectory", "warSourceDirectory", "webappDirectory", "workDirectory", "archive", "archiveClasses", "attachClasses", @@ -350,6 +357,9 @@ private static Xpp3Dom validateConfiguration(Plugin plugin, String goal, Xpp3Dom case "maven-ejb-plugin:ejb": goalConfig = stripConfigElements(config, EJB_PARAMS); break; + case "maven-bundle-plugin:bundle": + goalConfig = stripConfigElements(config, BUNDLE_PARAMS); + break; case "maven-war-plugin:war": goalConfig = stripConfigElements(config, WAR_PARAMS); break; diff --git a/liberty-maven-plugin/src/main/java/io/openliberty/tools/maven/utils/MavenProjectUtil.java b/liberty-maven-plugin/src/main/java/io/openliberty/tools/maven/utils/MavenProjectUtil.java index 46e31a839..a18899daa 100644 --- a/liberty-maven-plugin/src/main/java/io/openliberty/tools/maven/utils/MavenProjectUtil.java +++ b/liberty-maven-plugin/src/main/java/io/openliberty/tools/maven/utils/MavenProjectUtil.java @@ -69,6 +69,8 @@ public static String getAppNameClassifier(MavenProject proj) { pluginName = "maven-war-plugin"; } else if (proj.getPackaging().equals("ear")) { pluginName = "maven-ear-plugin"; + } else if (proj.getPackaging().equals("bundle")) { + pluginName = "maven-bundle-plugin"; } else { return null; } @@ -173,7 +175,8 @@ public static PluginExecution getPluginGoalExecution(MavenProject project, Strin * @return the manifest file */ public static File getManifestFile(MavenProject proj, String pluginArtifactId) { - Xpp3Dom dom = proj.getGoalConfiguration("org.apache.maven.plugins", pluginArtifactId, null, null); + String groupId = pluginArtifactId.equals("maven-bundle-plugin") ? "org.apache.felix" : "org.apache.maven.plugins"; + Xpp3Dom dom = proj.getGoalConfiguration(groupId, pluginArtifactId, null, null); if (dom != null) { Xpp3Dom archive = dom.getChild("archive"); if (archive != null) { @@ -183,6 +186,16 @@ public static File getManifestFile(MavenProject proj, String pluginArtifactId) { } } } + + if (pluginArtifactId.equals("maven-bundle-plugin")) { + // check for generated manifest file in target/classes/META-INF + String dependProjectTargetDir = proj.getBuild().getDirectory(); + File generatedManifest = new File(dependProjectTargetDir, "/classes/META-INF/MANIFEST.MF"); + if (generatedManifest.exists()) { + return generatedManifest; + } + } + return null; } diff --git a/mvnw b/mvnw index b7f064624..8d937f4c1 100755 --- a/mvnw +++ b/mvnw @@ -19,7 +19,7 @@ # ---------------------------------------------------------------------------- # ---------------------------------------------------------------------------- -# Apache Maven Wrapper startup batch script, version 3.1.1 +# Apache Maven Wrapper startup batch script, version 3.2.0 # # Required ENV vars: # ------------------ @@ -53,7 +53,7 @@ fi cygwin=false; darwin=false; mingw=false -case "`uname`" in +case "$(uname)" in CYGWIN*) cygwin=true ;; MINGW*) mingw=true;; Darwin*) darwin=true @@ -61,7 +61,7 @@ case "`uname`" in # See https://developer.apple.com/library/mac/qa/qa1170/_index.html if [ -z "$JAVA_HOME" ]; then if [ -x "/usr/libexec/java_home" ]; then - JAVA_HOME="`/usr/libexec/java_home`"; export JAVA_HOME + JAVA_HOME="$(/usr/libexec/java_home)"; export JAVA_HOME else JAVA_HOME="/Library/Java/Home"; export JAVA_HOME fi @@ -71,38 +71,38 @@ esac if [ -z "$JAVA_HOME" ] ; then if [ -r /etc/gentoo-release ] ; then - JAVA_HOME=`java-config --jre-home` + JAVA_HOME=$(java-config --jre-home) fi fi # For Cygwin, ensure paths are in UNIX format before anything is touched if $cygwin ; then [ -n "$JAVA_HOME" ] && - JAVA_HOME=`cygpath --unix "$JAVA_HOME"` + JAVA_HOME=$(cygpath --unix "$JAVA_HOME") [ -n "$CLASSPATH" ] && - CLASSPATH=`cygpath --path --unix "$CLASSPATH"` + CLASSPATH=$(cygpath --path --unix "$CLASSPATH") fi # For Mingw, ensure paths are in UNIX format before anything is touched if $mingw ; then - [ -n "$JAVA_HOME" ] && - JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`" + [ -n "$JAVA_HOME" ] && [ -d "$JAVA_HOME" ] && + JAVA_HOME="$(cd "$JAVA_HOME" || (echo "cannot cd into $JAVA_HOME."; exit 1); pwd)" fi if [ -z "$JAVA_HOME" ]; then - javaExecutable="`which javac`" - if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then + javaExecutable="$(which javac)" + if [ -n "$javaExecutable" ] && ! [ "$(expr "\"$javaExecutable\"" : '\([^ ]*\)')" = "no" ]; then # readlink(1) is not available as standard on Solaris 10. - readLink=`which readlink` - if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then + readLink=$(which readlink) + if [ ! "$(expr "$readLink" : '\([^ ]*\)')" = "no" ]; then if $darwin ; then - javaHome="`dirname \"$javaExecutable\"`" - javaExecutable="`cd \"$javaHome\" && pwd -P`/javac" + javaHome="$(dirname "\"$javaExecutable\"")" + javaExecutable="$(cd "\"$javaHome\"" && pwd -P)/javac" else - javaExecutable="`readlink -f \"$javaExecutable\"`" + javaExecutable="$(readlink -f "\"$javaExecutable\"")" fi - javaHome="`dirname \"$javaExecutable\"`" - javaHome=`expr "$javaHome" : '\(.*\)/bin'` + javaHome="$(dirname "\"$javaExecutable\"")" + javaHome=$(expr "$javaHome" : '\(.*\)/bin') JAVA_HOME="$javaHome" export JAVA_HOME fi @@ -118,7 +118,7 @@ if [ -z "$JAVACMD" ] ; then JAVACMD="$JAVA_HOME/bin/java" fi else - JAVACMD="`\\unset -f command; \\command -v java`" + JAVACMD="$(\unset -f command 2>/dev/null; \command -v java)" fi fi @@ -150,108 +150,99 @@ find_maven_basedir() { fi # workaround for JBEAP-8937 (on Solaris 10/Sparc) if [ -d "${wdir}" ]; then - wdir=`cd "$wdir/.."; pwd` + wdir=$(cd "$wdir/.." || exit 1; pwd) fi # end of workaround done - printf '%s' "$(cd "$basedir"; pwd)" + printf '%s' "$(cd "$basedir" || exit 1; pwd)" } # concatenates all lines of a file concat_lines() { if [ -f "$1" ]; then - echo "$(tr -s '\n' ' ' < "$1")" + # Remove \r in case we run on Windows within Git Bash + # and check out the repository with auto CRLF management + # enabled. Otherwise, we may read lines that are delimited with + # \r\n and produce $'-Xarg\r' rather than -Xarg due to word + # splitting rules. + tr -s '\r\n' ' ' < "$1" fi } -BASE_DIR=$(find_maven_basedir "$(dirname $0)") +log() { + if [ "$MVNW_VERBOSE" = true ]; then + printf '%s\n' "$1" + fi +} + +BASE_DIR=$(find_maven_basedir "$(dirname "$0")") if [ -z "$BASE_DIR" ]; then exit 1; fi MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}; export MAVEN_PROJECTBASEDIR -if [ "$MVNW_VERBOSE" = true ]; then - echo $MAVEN_PROJECTBASEDIR -fi +log "$MAVEN_PROJECTBASEDIR" ########################################################################################## # Extension to allow automatically downloading the maven-wrapper.jar from Maven-central # This allows using the maven wrapper in projects that prohibit checking in binary data. ########################################################################################## -if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then - if [ "$MVNW_VERBOSE" = true ]; then - echo "Found .mvn/wrapper/maven-wrapper.jar" - fi +wrapperJarPath="$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" +if [ -r "$wrapperJarPath" ]; then + log "Found $wrapperJarPath" else - if [ "$MVNW_VERBOSE" = true ]; then - echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..." - fi + log "Couldn't find $wrapperJarPath, downloading it ..." + if [ -n "$MVNW_REPOURL" ]; then - wrapperUrl="$MVNW_REPOURL/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar" + wrapperUrl="$MVNW_REPOURL/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar" else - wrapperUrl="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar" + wrapperUrl="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar" fi - while IFS="=" read key value; do - case "$key" in (wrapperUrl) wrapperUrl="$value"; break ;; + while IFS="=" read -r key value; do + # Remove '\r' from value to allow usage on windows as IFS does not consider '\r' as a separator ( considers space, tab, new line ('\n'), and custom '=' ) + safeValue=$(echo "$value" | tr -d '\r') + case "$key" in (wrapperUrl) wrapperUrl="$safeValue"; break ;; esac - done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties" - if [ "$MVNW_VERBOSE" = true ]; then - echo "Downloading from: $wrapperUrl" - fi - wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" + done < "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.properties" + log "Downloading from: $wrapperUrl" + if $cygwin; then - wrapperJarPath=`cygpath --path --windows "$wrapperJarPath"` + wrapperJarPath=$(cygpath --path --windows "$wrapperJarPath") fi if command -v wget > /dev/null; then - QUIET="--quiet" - if [ "$MVNW_VERBOSE" = true ]; then - echo "Found wget ... using wget" - QUIET="" - fi + log "Found wget ... using wget" + [ "$MVNW_VERBOSE" = true ] && QUIET="" || QUIET="--quiet" if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then - wget $QUIET "$wrapperUrl" -O "$wrapperJarPath" + wget $QUIET "$wrapperUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath" else - wget $QUIET --http-user="$MVNW_USERNAME" --http-password="$MVNW_PASSWORD" "$wrapperUrl" -O "$wrapperJarPath" + wget $QUIET --http-user="$MVNW_USERNAME" --http-password="$MVNW_PASSWORD" "$wrapperUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath" fi - [ $? -eq 0 ] || rm -f "$wrapperJarPath" elif command -v curl > /dev/null; then - QUIET="--silent" - if [ "$MVNW_VERBOSE" = true ]; then - echo "Found curl ... using curl" - QUIET="" - fi + log "Found curl ... using curl" + [ "$MVNW_VERBOSE" = true ] && QUIET="" || QUIET="--silent" if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then - curl $QUIET -o "$wrapperJarPath" "$wrapperUrl" -f -L + curl $QUIET -o "$wrapperJarPath" "$wrapperUrl" -f -L || rm -f "$wrapperJarPath" else - curl $QUIET --user "$MVNW_USERNAME:$MVNW_PASSWORD" -o "$wrapperJarPath" "$wrapperUrl" -f -L + curl $QUIET --user "$MVNW_USERNAME:$MVNW_PASSWORD" -o "$wrapperJarPath" "$wrapperUrl" -f -L || rm -f "$wrapperJarPath" fi - [ $? -eq 0 ] || rm -f "$wrapperJarPath" else - if [ "$MVNW_VERBOSE" = true ]; then - echo "Falling back to using Java to download" - fi - javaSource="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java" - javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" + log "Falling back to using Java to download" + javaSource="$MAVEN_PROJECTBASEDIR/.mvn/wrapper/MavenWrapperDownloader.java" + javaClass="$MAVEN_PROJECTBASEDIR/.mvn/wrapper/MavenWrapperDownloader.class" # For Cygwin, switch paths to Windows format before running javac if $cygwin; then - javaSource=`cygpath --path --windows "$javaSource"` - javaClass=`cygpath --path --windows "$javaClass"` + javaSource=$(cygpath --path --windows "$javaSource") + javaClass=$(cygpath --path --windows "$javaClass") fi if [ -e "$javaSource" ]; then if [ ! -e "$javaClass" ]; then - if [ "$MVNW_VERBOSE" = true ]; then - echo " - Compiling MavenWrapperDownloader.java ..." - fi - # Compiling the Java class + log " - Compiling MavenWrapperDownloader.java ..." ("$JAVA_HOME/bin/javac" "$javaSource") fi if [ -e "$javaClass" ]; then - # Running the downloader - if [ "$MVNW_VERBOSE" = true ]; then - echo " - Running MavenWrapperDownloader.java ..." - fi - ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR") + log " - Running MavenWrapperDownloader.java ..." + ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$wrapperUrl" "$wrapperJarPath") || rm -f "$wrapperJarPath" fi fi fi @@ -260,25 +251,55 @@ fi # End of extension ########################################################################################## +# If specified, validate the SHA-256 sum of the Maven wrapper jar file +wrapperSha256Sum="" +while IFS="=" read -r key value; do + case "$key" in (wrapperSha256Sum) wrapperSha256Sum=$value; break ;; + esac +done < "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.properties" +if [ -n "$wrapperSha256Sum" ]; then + wrapperSha256Result=false + if command -v sha256sum > /dev/null; then + if echo "$wrapperSha256Sum $wrapperJarPath" | sha256sum -c > /dev/null 2>&1; then + wrapperSha256Result=true + fi + elif command -v shasum > /dev/null; then + if echo "$wrapperSha256Sum $wrapperJarPath" | shasum -a 256 -c > /dev/null 2>&1; then + wrapperSha256Result=true + fi + else + echo "Checksum validation was requested but neither 'sha256sum' or 'shasum' are available." + echo "Please install either command, or disable validation by removing 'wrapperSha256Sum' from your maven-wrapper.properties." + exit 1 + fi + if [ $wrapperSha256Result = false ]; then + echo "Error: Failed to validate Maven wrapper SHA-256, your Maven wrapper might be compromised." >&2 + echo "Investigate or delete $wrapperJarPath to attempt a clean download." >&2 + echo "If you updated your Maven version, you need to update the specified wrapperSha256Sum property." >&2 + exit 1 + fi +fi + MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS" # For Cygwin, switch paths to Windows format before running java if $cygwin; then [ -n "$JAVA_HOME" ] && - JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"` + JAVA_HOME=$(cygpath --path --windows "$JAVA_HOME") [ -n "$CLASSPATH" ] && - CLASSPATH=`cygpath --path --windows "$CLASSPATH"` + CLASSPATH=$(cygpath --path --windows "$CLASSPATH") [ -n "$MAVEN_PROJECTBASEDIR" ] && - MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"` + MAVEN_PROJECTBASEDIR=$(cygpath --path --windows "$MAVEN_PROJECTBASEDIR") fi # Provide a "standardized" way to retrieve the CLI args that will # work with both Windows and non-Windows executions. -MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@" +MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $*" export MAVEN_CMD_LINE_ARGS WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain +# shellcheck disable=SC2086 # safe args exec "$JAVACMD" \ $MAVEN_OPTS \ $MAVEN_DEBUG_OPTS \ diff --git a/mvnw.cmd b/mvnw.cmd index 474c9d6b7..c4586b564 100644 --- a/mvnw.cmd +++ b/mvnw.cmd @@ -18,7 +18,7 @@ @REM ---------------------------------------------------------------------------- @REM ---------------------------------------------------------------------------- -@REM Apache Maven Wrapper startup batch script, version 3.1.1 +@REM Apache Maven Wrapper startup batch script, version 3.2.0 @REM @REM Required ENV vars: @REM JAVA_HOME - location of a JDK home dir @@ -119,7 +119,7 @@ SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe" set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar" set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain -set WRAPPER_URL="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar" +set WRAPPER_URL="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar" FOR /F "usebackq tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO ( IF "%%A"=="wrapperUrl" SET WRAPPER_URL=%%B @@ -133,7 +133,7 @@ if exist %WRAPPER_JAR% ( ) ) else ( if not "%MVNW_REPOURL%" == "" ( - SET WRAPPER_URL="%MVNW_REPOURL%/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar" + SET WRAPPER_URL="%MVNW_REPOURL%/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar" ) if "%MVNW_VERBOSE%" == "true" ( echo Couldn't find %WRAPPER_JAR%, downloading it ... @@ -153,6 +153,24 @@ if exist %WRAPPER_JAR% ( ) @REM End of extension +@REM If specified, validate the SHA-256 sum of the Maven wrapper jar file +SET WRAPPER_SHA_256_SUM="" +FOR /F "usebackq tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO ( + IF "%%A"=="wrapperSha256Sum" SET WRAPPER_SHA_256_SUM=%%B +) +IF NOT %WRAPPER_SHA_256_SUM%=="" ( + powershell -Command "&{"^ + "$hash = (Get-FileHash \"%WRAPPER_JAR%\" -Algorithm SHA256).Hash.ToLower();"^ + "If('%WRAPPER_SHA_256_SUM%' -ne $hash){"^ + " Write-Output 'Error: Failed to validate Maven wrapper SHA-256, your Maven wrapper might be compromised.';"^ + " Write-Output 'Investigate or delete %WRAPPER_JAR% to attempt a clean download.';"^ + " Write-Output 'If you updated your Maven version, you need to update the specified wrapperSha256Sum property.';"^ + " exit 1;"^ + "}"^ + "}" + if ERRORLEVEL 1 goto error +) + @REM Provide a "standardized" way to retrieve the CLI args that will @REM work with both Windows and non-Windows executions. set MAVEN_CMD_LINE_ARGS=%* diff --git a/pom.xml b/pom.xml index bab04c4f6..729b9eb3b 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ io.openliberty.tools liberty-maven - 3.9-SNAPSHOT + 3.8.3-SNAPSHOT pom Liberty Tools for Maven @@ -41,7 +41,8 @@ UTF-8 8 8 - 3.8.6 + 3.8.6 + 3.9.0 @@ -49,6 +50,38 @@ liberty-maven-plugin + + + + + org.codehaus.mojo + animal-sniffer-maven-plugin + 1.23 + + + org.apache.maven.plugins + maven-compiler-plugin + 3.11.0 + + + org.apache.maven.plugins + maven-invoker-plugin + 3.6.0 + + + org.apache.maven.plugins + maven-plugin-plugin + ${maven.plugin.tools.version} + + + org.apache.maven.plugins + maven-resources-plugin + 3.3.1 + + + + +