From c3bef11ff1a4ccb26ff539d68b79155448c99384 Mon Sep 17 00:00:00 2001 From: David Walluck Date: Sat, 23 Oct 2021 04:21:44 -0400 Subject: [PATCH] Add support for building under Java 17 (#884) --- .../src/it/build-metadata-plugin/ear/pom.xml | 2 +- .../src/it/build-metadata-plugin/war/pom.xml | 2 +- .../src/it/dual-property-exclusion/pom.xml | 4 ++-- .../src/it/dual-property-exclusion/test.properties | 2 +- .../src/it/dual-property-exclusion/verify.groovy | 8 ++++---- .../src/it/parent-injection-basic/pom.xml | 12 ++++++++++++ .../it/remote-dependency-management-parent/pom.xml | 4 ++++ .../src/it/remote-plugin-management-plugins/pom.xml | 2 +- .../it/remote-plugin-management-transitive/pom.xml | 5 +++++ .../verify.groovy | 2 +- .../remote-plugin-management-wildfly/test.properties | 2 +- .../remote-plugin-management-wildfly/verify.groovy | 2 +- .../pom.xml | 2 +- .../test.properties | 1 + .../verify.groovy | 2 +- pom.xml | 3 ++- 16 files changed, 39 insertions(+), 16 deletions(-) diff --git a/integration-test/src/it/build-metadata-plugin/ear/pom.xml b/integration-test/src/it/build-metadata-plugin/ear/pom.xml index 294a4c955..6cfd7b9dc 100644 --- a/integration-test/src/it/build-metadata-plugin/ear/pom.xml +++ b/integration-test/src/it/build-metadata-plugin/ear/pom.xml @@ -41,7 +41,7 @@ org.apache.maven.plugins maven-ear-plugin - 2.10.1 + 3.2.0 diff --git a/integration-test/src/it/build-metadata-plugin/war/pom.xml b/integration-test/src/it/build-metadata-plugin/war/pom.xml index 6b9c831c8..60669d922 100644 --- a/integration-test/src/it/build-metadata-plugin/war/pom.xml +++ b/integration-test/src/it/build-metadata-plugin/war/pom.xml @@ -41,7 +41,7 @@ org.apache.maven.plugins maven-war-plugin - 2.6 + 3.3.2 false diff --git a/integration-test/src/it/dual-property-exclusion/pom.xml b/integration-test/src/it/dual-property-exclusion/pom.xml index 068aa4c70..302ffedc3 100644 --- a/integration-test/src/it/dual-property-exclusion/pom.xml +++ b/integration-test/src/it/dual-property-exclusion/pom.xml @@ -24,7 +24,7 @@ org.jboss.integration-platform jboss-integration-platform-bom - 6.0.0.CR12 + 8.0.0.Final org.commonjava.maven.ext.integration-test @@ -35,7 +35,7 @@ Test overriding dependency versions - 6.0.6.Final + 8.6.0.Final diff --git a/integration-test/src/it/dual-property-exclusion/test.properties b/integration-test/src/it/dual-property-exclusion/test.properties index fa4702a8f..c69cad7ef 100644 --- a/integration-test/src/it/dual-property-exclusion/test.properties +++ b/integration-test/src/it/dual-property-exclusion/test.properties @@ -17,5 +17,5 @@ # Override the version of JUnit # The colon needs to be escaped to prevent the invoker plugin from misinterpreting it -dependencyExclusion.org.jboss.integration-platform\:jboss-integration-platform-bom@*=6.0.6.Final +dependencyExclusion.org.jboss.integration-platform\:jboss-integration-platform-bom@*=8.6.0.Final enabledDeprecatedProperties=true diff --git a/integration-test/src/it/dual-property-exclusion/verify.groovy b/integration-test/src/it/dual-property-exclusion/verify.groovy index 0de0e6681..a5c1a9ce4 100644 --- a/integration-test/src/it/dual-property-exclusion/verify.groovy +++ b/integration-test/src/it/dual-property-exclusion/verify.groovy @@ -15,14 +15,14 @@ */ def pomFile = new File( basedir, 'pom.xml' ) def pomChildFile = new File( basedir, 'child/pom.xml' ) -System.out.println( "Slurping POM: ${pomFile.getAbsolutePath()} and ${pomChildFile.getAbsolutePath()}" ) +println "Slurping POM: ${pomFile.getAbsolutePath()} and ${pomChildFile.getAbsolutePath()}" def pom = new XmlSlurper().parse( pomFile ) def pomChild = new XmlSlurper().parse( pomChildFile ) def passed = false pom.properties.each { - if ( it.text().contains ("6.0.6.Final") ) + if ( it.text().contains( "8.6.0.Final" ) ) { passed = true } @@ -32,10 +32,10 @@ assert (passed == true) passed = false pomChild.properties.each { - if ( it.text().contains ("6.0.6.Final") ) + if ( it.text().contains( "8.6.0.Final" ) ) { passed = true } } -assert (passed == true) +assert passed diff --git a/integration-test/src/it/parent-injection-basic/pom.xml b/integration-test/src/it/parent-injection-basic/pom.xml index 9651b3cba..477532184 100644 --- a/integration-test/src/it/parent-injection-basic/pom.xml +++ b/integration-test/src/it/parent-injection-basic/pom.xml @@ -31,4 +31,16 @@ UTF-8 + + + + + org.apache.maven.plugins + maven-enforcer-plugin + 3.0.0 + + + + + diff --git a/integration-test/src/it/remote-dependency-management-parent/pom.xml b/integration-test/src/it/remote-dependency-management-parent/pom.xml index ab89b6233..c5eb91e15 100644 --- a/integration-test/src/it/remote-dependency-management-parent/pom.xml +++ b/integration-test/src/it/remote-dependency-management-parent/pom.xml @@ -48,6 +48,10 @@ 1.8 + + maven-enforcer-plugin + 3.0.0 + diff --git a/integration-test/src/it/remote-plugin-management-plugins/pom.xml b/integration-test/src/it/remote-plugin-management-plugins/pom.xml index b227a9e4a..498c090c7 100644 --- a/integration-test/src/it/remote-plugin-management-plugins/pom.xml +++ b/integration-test/src/it/remote-plugin-management-plugins/pom.xml @@ -29,7 +29,7 @@ UTF-8 - 1.4.1 + 3.0.0 diff --git a/integration-test/src/it/remote-plugin-management-transitive/pom.xml b/integration-test/src/it/remote-plugin-management-transitive/pom.xml index 042532312..4d563a427 100644 --- a/integration-test/src/it/remote-plugin-management-transitive/pom.xml +++ b/integration-test/src/it/remote-plugin-management-transitive/pom.xml @@ -53,6 +53,11 @@ maven-compiler-plugin 3.1 + + org.apache.maven.plugins + maven-enforcer-plugin + 3.0.0 + org.apache.maven.plugins maven-install-plugin diff --git a/integration-test/src/it/remote-plugin-management-transitive/verify.groovy b/integration-test/src/it/remote-plugin-management-transitive/verify.groovy index 1c77c4841..7f2cc0e29 100644 --- a/integration-test/src/it/remote-plugin-management-transitive/verify.groovy +++ b/integration-test/src/it/remote-plugin-management-transitive/verify.groovy @@ -25,4 +25,4 @@ pomFile.eachLine { } } -assert message == 2 +assert message == 3 diff --git a/integration-test/src/it/remote-plugin-management-wildfly/test.properties b/integration-test/src/it/remote-plugin-management-wildfly/test.properties index c601a43ec..03fc2369a 100644 --- a/integration-test/src/it/remote-plugin-management-wildfly/test.properties +++ b/integration-test/src/it/remote-plugin-management-wildfly/test.properties @@ -17,6 +17,6 @@ # Override the version of maven compiler plugin # The colon needs to be escaped to prevent the invoker plugin from misinterpreting it -pluginManagement=org.wildfly.core\:wildfly-core-parent\:2.0.10.Final +pluginManagement=org.wildfly.core\:wildfly-core-parent\:3.0.0.Final strictAlignment=false overrideTransitive=true diff --git a/integration-test/src/it/remote-plugin-management-wildfly/verify.groovy b/integration-test/src/it/remote-plugin-management-wildfly/verify.groovy index 18a2f1732..1ab0b4d67 100644 --- a/integration-test/src/it/remote-plugin-management-wildfly/verify.groovy +++ b/integration-test/src/it/remote-plugin-management-wildfly/verify.groovy @@ -20,7 +20,7 @@ def pom = new XmlSlurper().parse( pomFile ) def plugin = pom.build.pluginManagement.plugins.plugin.find { it.artifactId.text() == "maven-compiler-plugin" } assert plugin != null -assert plugin.version.text() == "3.1" +assert plugin.version.text() == "3.6.1" def message = 0 pomFile.eachLine { diff --git a/integration-test/src/it/rest-dependency-version-manip-child-module/pom.xml b/integration-test/src/it/rest-dependency-version-manip-child-module/pom.xml index 7712ccd25..e413dbc1b 100644 --- a/integration-test/src/it/rest-dependency-version-manip-child-module/pom.xml +++ b/integration-test/src/it/rest-dependency-version-manip-child-module/pom.xml @@ -24,7 +24,7 @@ org.jboss jboss-parent - 11 + 37 org.commonjava.maven.ext.integration-test diff --git a/integration-test/src/it/rest-dependency-version-manip-child-module/test.properties b/integration-test/src/it/rest-dependency-version-manip-child-module/test.properties index c2f3a115b..7d15b17cb 100644 --- a/integration-test/src/it/rest-dependency-version-manip-child-module/test.properties +++ b/integration-test/src/it/rest-dependency-version-manip-child-module/test.properties @@ -18,5 +18,6 @@ restURL=http://127.0.0.1:8089 versionIncrementalSuffix=redhat overrideTransitive=false strictAlignment=true +dependencyOverride.org.jboss\:jboss-parent@*=37.0.0.redhat-00001 dependencySource=rest versionIncrementalSuffixPadding=0 diff --git a/integration-test/src/it/rest-dependency-version-manip-child-module/verify.groovy b/integration-test/src/it/rest-dependency-version-manip-child-module/verify.groovy index b28115849..000737951 100644 --- a/integration-test/src/it/rest-dependency-version-manip-child-module/verify.groovy +++ b/integration-test/src/it/rest-dependency-version-manip-child-module/verify.groovy @@ -26,7 +26,7 @@ System.out.println( "POM Child Version: ${pomChild.version.text()}" ) assert pomChild.parent.version.text().endsWith( '.redhat-3' ) System.out.println( "POM parent Version: ${pom.parent.version.text()}" ) -assert pom.parent.version.text().endsWith( '-redhat-1' ) +assert pom.parent.version.text().endsWith( '.redhat-00001' ) // Currently the AddSuffixJettyHandler doesn't do OSGi compatibility. def dependency = pom.dependencyManagement.dependencies.dependency.find { it.artifactId.text() == "commons-lang" } diff --git a/pom.xml b/pom.xml index 40e499780..4edfd87bb 100644 --- a/pom.xml +++ b/pom.xml @@ -82,7 +82,7 @@ 2.1.0 0.16.6 - 3.0.7 + 3.0.8 3.11.10 2.3.0 1.7.30 @@ -538,6 +538,7 @@ maven-resources-plugin \ + UTF-8