[JIRA] [core] (JENKINS-33966) JAVA_HOME is not set when Maven is automatically installed
Title: Message Title Jesse Glick resolved as Not A Defect See discussion in JENKINS-34012. Jenkins / JENKINS-33966 JAVA_HOME is not set when Maven is automatically installed Change By: Jesse Glick Status: Open Resolved Resolution: Not A Defect Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [core] (JENKINS-33966) JAVA_HOME is not set when Maven is automatically installed
Title: Message Title Daniel Beck commented on JENKINS-33966 Re: JAVA_HOME is not set when Maven is automatically installed Not sure that's how it's supposed to work. Jesse Glick? Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [core] (JENKINS-33966) JAVA_HOME is not set when Maven is automatically installed
Title: Message Title Laurent TOURREAU commented on JENKINS-33966 Re: JAVA_HOME is not set when Maven is automatically installed I did this as it : node { git url: 'https://github.com/jglick/simple-maven-project-with-tests.git' def mvnHome = tool 'M3' def javaHome = tool 'JDK-1.8' bat "\"${mvnHome}\"\\bin\\mvn -B verify" } I still get the error: [Pipeline] Allocate node : Start Running on master in C:\Program Files (x86)\Jenkins\workspace\myPipeline [Pipeline] node { [Pipeline] git Fetching changes from the remote Git repository Checking out Revision 7dac409d4bd2fec35a4ccde0cb424042cba671df (refs/remotes/origin/master) [Pipeline] tool [Pipeline] tool [Pipeline] bat [myPipeline] Running batch script C:\Program Files (x86)\Jenkins\workspace\myPipeline>"C:\Program Files (x86)\Jenkins\tools\hudson.tasks.Maven_MavenInstallation\M3"\bin\mvn -B verify Error: JAVA_HOME not found in your environment. Please set the JAVA_HOME variable in your environment to match the location of your Java installation. [Pipeline] } //node [Pipeline] Allocate node : End [Pipeline] End of Pipeline ERROR: script returned exit code 1 Finished: FAILURE If i explicitely set JAVA_HOME, it works node { git url: 'https://github.com/jglick/simple-maven-project-with-tests.git' def mvnHome = tool 'M3' env.JAVA_HOME = tool 'JDK-1.8' bat "\"${mvnHome}\"\\bin\\mvn -B verify" } Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265)
[JIRA] [core] (JENKINS-33966) JAVA_HOME is not set when Maven is automatically installed
Title: Message Title Laurent TOURREAU edited a comment on JENKINS-33966 Re: JAVA_HOME is not set when Maven is automatically installed I did this as it :{code}node { git url: 'https://github.com/jglick/simple-maven-project-with-tests.git' def mvnHome = tool 'M3' def javaHome = tool 'JDK-1.8' bat "\"${mvnHome}\"\\bin\\mvn -B verify"}{code}I still get the error:{code}[Pipeline] Allocate node : StartRunning on master in C:\Program Files (x86)\Jenkins\workspace\myPipeline[Pipeline] node {[Pipeline] gitFetching changes from the remote Git repositoryChecking out Revision 7dac409d4bd2fec35a4ccde0cb424042cba671df (refs/remotes/origin/master)[Pipeline] tool[Pipeline] tool[Pipeline] bat[myPipeline] Running batch scriptC:\Program Files (x86)\Jenkins\workspace\myPipeline>"C:\Program Files (x86)\Jenkins\tools\hudson.tasks.Maven_MavenInstallation\M3"\bin\mvn -B verify Error: JAVA_HOME not found in your environment. Please set the JAVA_HOME variable in your environment to match the location of your Java installation. [Pipeline] } //node[Pipeline] Allocate node : End[Pipeline] End of PipelineERROR: script returned exit code 1Finished: FAILURE{code}If i explicitely set JAVA_HOME, it works{code}node { git url: 'https://github.com/jglick/simple-maven-project-with-tests.git' def mvnHome = tool 'M3' env.JAVA_HOME = tool 'JDK-1.8' bat "\"${mvnHome}\"\\bin\\mvn -B verify"}{code} Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [core] (JENKINS-33966) JAVA_HOME is not set when Maven is automatically installed
Title: Message Title Daniel Beck commented on JENKINS-33966 Re: JAVA_HOME is not set when Maven is automatically installed What happens when you call tool 'JDK-1.8' in your pipeline? Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [core] (JENKINS-33966) JAVA_HOME is not set when Maven is automatically installed
Title: Message Title Laurent TOURREAU edited a comment on JENKINS-33966 Re: JAVA_HOME is not set when Maven is automatically installed On Global Tool Configuration, I add a new JDK installation called "JDK-1.8".I set the JAVA_HOME field under installation name to C:\Program Files\Java\jdk1.8.0_77 and run the job again -> same result JAVA_HOME is not found. Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [core] (JENKINS-33966) JAVA_HOME is not set when Maven is automatically installed
Title: Message Title Laurent TOURREAU commented on JENKINS-33966 Re: JAVA_HOME is not set when Maven is automatically installed On Global Tool Configuration, I add a new JDK installation called "JDK-1.8". I set the JAVA_HOME to C:\Program Files\Java\jdk1.8.0_77 and run the job again -> same result JAVA_HOME is not found. Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [core] (JENKINS-33966) JAVA_HOME is not set when Maven is automatically installed
Title: Message Title Daniel Beck updated an issue Jenkins / JENKINS-33966 JAVA_HOME is not set when Maven is automatically installed Straightforward workaround present, therefore reducing priority. Also, could probably define JDK installations (with a defined path, doesn't need to be auto-installed), and reference those in the pipeline. Change By: Daniel Beck Priority: Critical Minor Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [core] (JENKINS-33966) JAVA_HOME is not set when Maven is automatically installed
Title: Message Title Daniel Beck commented on JENKINS-33966 Re: JAVA_HOME is not set when Maven is automatically installed Why not have Jenkins also install Java? Is Java on your PATH? Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [core] (JENKINS-33966) JAVA_HOME is not set when Maven is automatically installed
Title: Message Title Andrew Bayer updated an issue Jenkins / JENKINS-33966 JAVA_HOME is not set when Maven is automatically installed Change By: Andrew Bayer Priority: Minor Critical Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [core] (JENKINS-33966) JAVA_HOME is not set when Maven is automatically installed
Title: Message Title Laurent TOURREAU created an issue Jenkins / JENKINS-33966 JAVA_HOME is not set when Maven is automatically installed Issue Type: Bug Assignee: Unassigned Components: core Created: 2016/Mar/31 9:25 PM Environment: Windows 10, Jenkins 2.0-beta-1, JDK 1.8.0_77 Labels: 2.0 2.0-beta Priority: Minor Reporter: Laurent TOURREAU I run Jenkins 2.0 beta binary under Windows 10. I declared a Maven installation "M3" under Global Tool Configuration. I created the pipeline job with the following script: node { git url: 'https://github.com/jglick/simple-maven-project-with-tests.git' def mvnHome = tool 'M3' bat "${mvnHome}\\bin\\mvn -B verify" } I get the following error when installing Maven: