Skip to content

Commit 7786007

Browse files
committed
Set Java home for maven if jdkhome set
1 parent e169e89 commit 7786007

File tree

12 files changed

+16
-11
lines changed

12 files changed

+16
-11
lines changed

build-tools/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<modelVersion>4.0.0</modelVersion>
33
<groupId>fi.helsinki.cs.tmc</groupId>
44
<artifactId>build-tools</artifactId>
5-
<version>0.7.11-SNAPSHOT</version>
5+
<version>0.7.12-SNAPSHOT</version>
66
<name>build-tools</name>
77

88
<!-- Deploy to maven.testmycode.net/nexus -->

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
<groupId>fi.helsinki.cs.tmc</groupId>
55
<artifactId>tmc-langs</artifactId>
6-
<version>0.7.11-SNAPSHOT</version>
6+
<version>0.7.12-SNAPSHOT</version>
77
<packaging>pom</packaging>
88
<name>tmc-langs</name>
99
<url>http://testmycode.net</url>

tmc-langs-cli/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<artifactId>tmc-langs</artifactId>
66
<groupId>fi.helsinki.cs.tmc</groupId>
7-
<version>0.7.11-SNAPSHOT</version>
7+
<version>0.7.12-SNAPSHOT</version>
88
</parent>
99
<modelVersion>4.0.0</modelVersion>
1010

tmc-langs-framework/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>fi.helsinki.cs.tmc</groupId>
66
<artifactId>tmc-langs</artifactId>
7-
<version>0.7.11-SNAPSHOT</version>
7+
<version>0.7.12-SNAPSHOT</version>
88
<relativePath>../</relativePath>
99
</parent>
1010
<properties>

tmc-langs-java/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>fi.helsinki.cs.tmc</groupId>
66
<artifactId>tmc-langs</artifactId>
7-
<version>0.7.11-SNAPSHOT</version>
7+
<version>0.7.12-SNAPSHOT</version>
88
</parent>
99

1010
<properties>

tmc-langs-java/src/main/java/fi/helsinki/cs/tmc/langs/java/maven/MavenInvokatorMavenTaskRunner.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,11 @@ public MavenExecutionResult exec(Path projectPath, String[] mavenArgs) {
4343

4444
InvocationRequest request = new DefaultInvocationRequest();
4545
request.setMavenOpts(MAVEN_OPTS);
46+
String jdkhome = System.getenv("jdkhome");
47+
Path jdkhomePath = Paths.get(jdkhome);
48+
if (jdkhome != null && jdkhome.length() > 0 && Files.exists(jdkhomePath)) {
49+
request.setJavaHome(jdkhomePath.toFile());
50+
}
4651

4752
String mavenHome = System.getenv("M3_HOME");
4853
if (mavenHome == null) {

tmc-langs-make/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>fi.helsinki.cs.tmc</groupId>
66
<artifactId>tmc-langs</artifactId>
7-
<version>0.7.11-SNAPSHOT</version>
7+
<version>0.7.12-SNAPSHOT</version>
88
</parent>
99

1010
<properties>

tmc-langs-notests/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>fi.helsinki.cs.tmc</groupId>
66
<artifactId>tmc-langs</artifactId>
7-
<version>0.7.11-SNAPSHOT</version>
7+
<version>0.7.12-SNAPSHOT</version>
88
</parent>
99

1010
<properties>

tmc-langs-python3/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>fi.helsinki.cs.tmc</groupId>
66
<artifactId>tmc-langs</artifactId>
7-
<version>0.7.11-SNAPSHOT</version>
7+
<version>0.7.12-SNAPSHOT</version>
88
</parent>
99

1010
<properties>

tmc-langs-qmake/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>fi.helsinki.cs.tmc</groupId>
66
<artifactId>tmc-langs</artifactId>
7-
<version>0.7.11-SNAPSHOT</version>
7+
<version>0.7.12-SNAPSHOT</version>
88
</parent>
99

1010
<properties>

0 commit comments

Comments
 (0)