Skip to content
This repository has been archived by the owner on Oct 1, 2020. It is now read-only.

Commit

Permalink
Use maven-toolchains-plugin
Browse files Browse the repository at this point in the history
This allows to run tests with a specific version of JDK independent from
the one Maven is running with.
  • Loading branch information
Godin committed Jul 24, 2016
1 parent 5474348 commit 0611873
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions com.mountainminds.eclemma.build/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,11 @@
<artifactId>maven-dependency-plugin</artifactId>
<version>2.10</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-toolchains-plugin</artifactId>
<version>1.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jarsigner-plugin</artifactId>
Expand Down Expand Up @@ -363,6 +368,39 @@
</plugins>
</build>
</profile>

<profile>
<id>jdk-toolchain</id>
<activation>
<property>
<name>jdk.version</name>
</property>
</activation>
<build>
<plugins>
<!-- See http:https://maven.apache.org/guides/mini/guide-using-toolchains.html -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-toolchains-plugin</artifactId>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>toolchain</goal>
</goals>
</execution>
</executions>
<configuration>
<toolchains>
<jdk>
<version>${jdk.version}</version>
</jdk>
</toolchains>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>

</project>

0 comments on commit 0611873

Please sign in to comment.