Skip to content

Commit 4103622

Browse files
author
Soroosh Sarabadani
committed
Add tools.jar to boot classpath only for java8
1 parent 14167cf commit 4103622

File tree

1 file changed

+47
-20
lines changed

1 file changed

+47
-20
lines changed

operator-framework/pom.xml

Lines changed: 47 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -21,26 +21,53 @@
2121
<maven.compiler.target>1.8</maven.compiler.target>
2222
</properties>
2323

24-
<build>
25-
<plugins>
26-
<plugin>
27-
<groupId>org.apache.maven.plugins</groupId>
28-
<artifactId>maven-surefire-plugin</artifactId>
29-
<version>${surefire.version}</version>
30-
</plugin>
31-
<plugin>
32-
<groupId>org.apache.maven.plugins</groupId>
33-
<artifactId>maven-compiler-plugin</artifactId>
34-
<configuration>
35-
<compilerArguments>
36-
<bootclasspath>
37-
${java.home}/lib/rt.jar${path.separator}${java.home}/lib/jce.jar${path.separator}${java.home}/../lib/tools.jar
38-
</bootclasspath>
39-
</compilerArguments>
40-
</configuration>
41-
</plugin>
42-
</plugins>
43-
</build>
24+
<profiles>
25+
<profile>
26+
<id>java8</id>
27+
<activation>
28+
<jdk>1.8</jdk>
29+
</activation>
30+
<build>
31+
<plugins>
32+
<plugin>
33+
<groupId>org.apache.maven.plugins</groupId>
34+
<artifactId>maven-surefire-plugin</artifactId>
35+
<version>${surefire.version}</version>
36+
</plugin>
37+
<plugin>
38+
<groupId>org.apache.maven.plugins</groupId>
39+
<artifactId>maven-compiler-plugin</artifactId>
40+
<configuration>
41+
<compilerArguments>
42+
<bootclasspath>
43+
${java.home}/lib/rt.jar${path.separator}${java.home}/lib/jce.jar${path.separator}${java.home}/../lib/tools.jar
44+
</bootclasspath>
45+
</compilerArguments>
46+
</configuration>
47+
</plugin>
48+
</plugins>
49+
</build>
50+
</profile>
51+
<profile>
52+
<id>default</id>
53+
<activation>
54+
<activeByDefault>true</activeByDefault>
55+
</activation>
56+
<build>
57+
<plugins>
58+
<plugin>
59+
<groupId>org.apache.maven.plugins</groupId>
60+
<artifactId>maven-surefire-plugin</artifactId>
61+
<version>${surefire.version}</version>
62+
</plugin>
63+
</plugins>
64+
</build>
65+
</profile>
66+
</profiles>
67+
68+
69+
70+
4471

4572
<dependencies>
4673
<dependency>

0 commit comments

Comments
 (0)