Skip to content

Commit

Permalink
Added java9/10 build profiles for surefire and compiler (#617)
Browse files Browse the repository at this point in the history
  • Loading branch information
garethahealy committed Apr 13, 2018
1 parent 6bd8875 commit 6af33dc
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 19 deletions.
4 changes: 2 additions & 2 deletions core/pom.xml
Expand Up @@ -312,9 +312,9 @@
</build>
</profile>
<profile>
<id>jdk9-build</id>
<id>above-jdk8-build</id>
<activation>
<jdk>9</jdk>
<jdk>[9,12)</jdk>
</activation>
<build>
<plugins>
Expand Down
84 changes: 67 additions & 17 deletions plugins-parent/pom.xml
Expand Up @@ -252,22 +252,6 @@
</pluginManagement>

<plugins>
<!-- Core Java Plugins; alphabetical order -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>${project.java.version}</source>
<target>${project.java.version}</target>
<encoding>${project.build.sourceEncoding}</encoding>
<compilerArgs>
<compilerArg>-Xdiags:verbose</compilerArg>
<compilerArg>-Xlint:all</compilerArg>
<compilerArg>-Xlint:-processing</compilerArg>
<!--<compilerArg>-Werror</compilerArg>-->
</compilerArgs>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
Expand Down Expand Up @@ -449,8 +433,74 @@
</execution>
</executions>
</plugin>

</plugins>
</build>

<profiles>
<profile>
<id>jdk8-build</id>
<activation>
<jdk>1.8</jdk>
</activation>
<build>
<plugins>
<!-- Core Java Plugins; alphabetical order -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>${project.java.version}</source>
<target>${project.java.version}</target>
<encoding>${project.build.sourceEncoding}</encoding>
<compilerArgs>
<compilerArg>-Xdiags:verbose</compilerArg>
<compilerArg>-Xlint:all</compilerArg>
<compilerArg>-Xlint:-processing</compilerArg>
<!--<compilerArg>-Werror</compilerArg>-->
</compilerArgs>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>above-jdk8-build</id>
<activation>
<jdk>[9,12)</jdk>
</activation>
<build>
<plugins>
<!-- Core Java Plugins; alphabetical order -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>${project.java.version}</source>
<target>${project.java.version}</target>
<encoding>${project.build.sourceEncoding}</encoding>
<compilerArgs>
<compilerArg>-Xdiags:verbose</compilerArg>
<compilerArg>-Xlint:all</compilerArg>
<compilerArg>-Xlint:-processing</compilerArg>
<!--<compilerArg>-Werror</compilerArg>-->
<arg>--add-modules</arg>
<arg>java.xml.bind,java.activation</arg>
</compilerArgs>
</configuration>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>--add-modules java.xml.bind,java.activation
--add-opens java.base/java.lang=ALL-UNNAMED
--add-exports=java.xml.bind/com.sun.xml.internal.bind=ALL-UNNAMED
--add-exports=java.xml.bind/com.sun.xml.internal.bind.v2=ALL-UNNAMED
--add-exports=java.xml.bind/com.sun.xml.internal.bind.v2.runtime.reflect=ALL-UNNAMED
</argLine>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>

0 comments on commit 6af33dc

Please sign in to comment.