Re: Question about JDK and Maven through Jenkins

2019-05-10 Thread Itamar Tafarello
It worked for me. First step I setup the Java settings adding the location of the java binary Then I changed the jenkinsfile adding the JDK option pipeline { agent any tools { maven 'Default' * jdk 'Default'* } : On Monday, February 19, 2018 at

Re: Question about JDK and Maven through Jenkins

2018-05-14 Thread santosh salunke
Thanks :) On Monday, February 19, 2018 at 7:24:39 PM UTC+5:30, Cyrille Le Clerc wrote: > > Can you install "java-1.8.0-openjdk-devel" on your server so that > javac-1.8 is also installed? > > I suspect that Jenkins and Maven get tricked by the fact that your default > "java" installation

Re: Question about JDK and Maven through Jenkins

2018-02-19 Thread Fábio Cabrita
Thats the strange part because I have *javac *installed in this system. Now I have added a new field for jdk in jenkinsfile(as well as in Global Tools Installer) and its working: tools { jdk 'java_9' } Thanks for the help Cyrille Le Clerc! segunda-feira, 19 de Fevereiro de

Re: Question about JDK and Maven through Jenkins

2018-02-19 Thread Cyrille Le Clerc
Can you install "java-1.8.0-openjdk-devel" on your server so that javac-1.8 is also installed? I suspect that Jenkins and Maven get tricked by the fact that your default "java" installation doesn't have a "javac" compiler. If you cannot install "java-1.8.0-openjdk-devel", I strongly recommend

Re: Question about JDK and Maven through Jenkins

2018-02-19 Thread Fábio Cabrita
Here are both command paths: root@jenkins-server /h/jenkins> which java /bin/java root@jenkins-server /h/jenkins> which javac /bin/javac While checking mvn, I notice that Java home is set to JRE instead of JDK: [jenkins@jenkins-server ~]$ mvn --version Apache Maven 3.5.2

Re: Question about JDK and Maven through Jenkins

2018-02-16 Thread Cyrille Le Clerc
Please try "which java && which javac" doing an ssh on this build agent. I suspect that "javac" is missing and that would explain "No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?" On Fri, Feb 16, 2018 at 4:36 PM, Fábio Cabrita

Re: Question about JDK and Maven through Jenkins

2018-02-16 Thread Victor Martinez
if you run mvn -V -v . then you will see what's the java version and some other mvn environmental details which are used within maven, most likely it's not using the JDK but the JRE for some reason, please review how that particular JDK setup was made. Cheers -- You received this message

Re: Question about JDK and Maven through Jenkins

2018-02-16 Thread Fábio Cabrita
Using *mvn -X *to get an extented debug I got: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project jenkins-example: Compilation failure

Re: Question about JDK and Maven through Jenkins

2018-02-15 Thread Cyrille Le Clerc
Hello Fábio, Could you have installed a JRE instead of installing a JDK on your build agent? Can you please: - Add the following instruction in your Jenkinsfile just before the invocation sh "mvn..." (1): - sh "which java" - sh "which javac" - Re run the pipeline -

Question about JDK and Maven through Jenkins

2018-02-14 Thread Fábio Cabrita
Hello, Its my first time using jenkins and I am still learning how it works, so if you see some unnecessary info dont be mad lol. I am using a CentOS 7, and I have installed JAVA(openjdk version "1.8.0_161") and MAVEN(Apache Maven 3.5.2). Now, I have imported the repo from this tutorial(