Skip to content

Commit

Permalink
Add support for building under Java 17
Browse files Browse the repository at this point in the history
  • Loading branch information
dwalluck committed Oct 5, 2021
1 parent e8d4b2e commit e668e26
Show file tree
Hide file tree
Showing 16 changed files with 39 additions and 16 deletions.
2 changes: 1 addition & 1 deletion integration-test/src/it/build-metadata-plugin/ear/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ear-plugin</artifactId>
<version>2.10.1</version>
<version>3.2.0</version>
</plugin>
</plugins>
</build>
Expand Down
2 changes: 1 addition & 1 deletion integration-test/src/it/build-metadata-plugin/war/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.6</version>
<version>3.3.2</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
Expand Down
4 changes: 2 additions & 2 deletions integration-test/src/it/dual-property-exclusion/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<parent>
<groupId>org.jboss.integration-platform</groupId>
<artifactId>jboss-integration-platform-bom</artifactId>
<version>6.0.0.CR12</version>
<version>8.0.0.Final</version>
</parent>

<groupId>org.commonjava.maven.ext.integration-test</groupId>
Expand All @@ -35,7 +35,7 @@
<name>Test overriding dependency versions</name>

<properties>
<org.jboss.integration-platform>6.0.6.Final</org.jboss.integration-platform>
<org.jboss.integration-platform>8.6.0.Final</org.jboss.integration-platform>
</properties>

<dependencyManagement>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
8 changes: 4 additions & 4 deletions integration-test/src/it/dual-property-exclusion/verify.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand All @@ -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
12 changes: 12 additions & 0 deletions integration-test/src/it/parent-injection-basic/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,16 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.0.0</version>
</plugin>
</plugins>
</pluginManagement>
</build>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.0.0</version>
</plugin>
</plugins>
</pluginManagement>
</build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<enforcer.version>1.4.1</enforcer.version>
<enforcer.version>3.0.0</enforcer.version>
</properties>

<dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.0.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ pomFile.eachLine {
}
}

assert message == 2
assert message == 3
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<parent>
<groupId>org.jboss</groupId>
<artifactId>jboss-parent</artifactId>
<version>11</version>
<version>37</version>
</parent>

<groupId>org.commonjava.maven.ext.integration-test</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
Expand Down
3 changes: 2 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
<daVersion>2.1.0</daVersion>
<galleyVersion>0.16.6</galleyVersion>

<groovyVersion>3.0.7</groovyVersion>
<groovyVersion>3.0.8</groovyVersion>
<unirestVersion>3.11.10</unirestVersion>
<jsonPathVersion>2.3.0</jsonPathVersion>
<slf4jVersion>1.7.30</slf4jVersion>
Expand Down Expand Up @@ -538,6 +538,7 @@
<artifactId>maven-resources-plugin</artifactId>
<configuration>
<escapeString>\</escapeString>
<propertiesEncoding>UTF-8</propertiesEncoding>
</configuration>
</plugin>
<plugin>
Expand Down

0 comments on commit e668e26

Please sign in to comment.