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 <fabioescabr...@gmail.com>
wrote:

> 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
>
>  
> <http://192.168.1.6:8080/blue/organizations/jenkins/jenkins-example-10/detail/jenkins-example-10/20/pipeline#step-16-log-438>[ERROR]
>  No compiler is provided in this environment. Perhaps you are running on a 
> JRE rather than a JDK?
>
>  
> <http://192.168.1.6:8080/blue/organizations/jenkins/jenkins-example-10/detail/jenkins-example-10/20/pipeline#step-16-log-439>[ERROR]
>  -> [Help 1]
>
>  
> <http://192.168.1.6:8080/blue/organizations/jenkins/jenkins-example-10/detail/jenkins-example-10/20/pipeline#step-16-log-440>org.apache.maven.lifecycle.LifecycleExecutionException:
>  Failed to execute goal 
> org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) 
> on project jenkins-example: Compilation failure
>
>  
> <http://192.168.1.6:8080/blue/organizations/jenkins/jenkins-example-10/detail/jenkins-example-10/20/pipeline#step-16-log-441>No
>  compiler is provided in this environment. Perhaps you are running on a JRE 
> rather than a JDK?
>
>
>
>
> quarta-feira, 14 de Fevereiro de 2018 às 18:42:01 UTC, Fábio Cabrita
> escreveu:
>>
>> 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(https://www.youtube.c
>> om/watch?v=s73nhwYBtzE), to my new account at bitbucket.
>>
>> As plugins I have install several that to me was looking necessary for
>> that tutorial: https://pastebin.com/zU19r8PV
>>
>> Then I created a new Pipeline at Jenkins with the right login for my
>> bitbucket repo git.
>>
>> Then tried to 'Build Now' but it fails at Compile Stage:
>>
>> [INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @
>> jenkins-example ---
>> [INFO] Changes detected - recompiling the module!
>> [INFO] Compiling 1 source file to /var/lib/jenkins/workspace/jen
>> kins-example/target/classes
>> [INFO] -------------------------------------------------------------
>> *[ERROR] COMPILATION ERROR :*
>> [INFO] -------------------------------------------------------------
>> *[ERROR] No compiler is provided in this environment. Perhaps you are
>> running on a JRE rather than a JDK?*
>> [INFO] 1 error
>> [INFO] 1 error
>> [INFO] -------------------------------------------------------------
>> [INFO] ------------------------------------------------------------
>> ------------
>> [INFO] BUILD FAILURE
>> [INFO] ------------------------------------------------------------
>> ------------
>> [INFO] Total time: 0.767 s
>> [INFO] Finished at: 2018-02-13T16:45:06Z
>> [INFO] Final Memory: 9M/102M
>> [INFO] ------------------------------------------------------------
>> ------------
>> [INFO] [jenkins-event-spy] Generated /var/lib/jenkins/workspace/jen
>> kins-example@tmp/withMavenabb6bf9d/maven-spy-20180213-
>> 164505-820349381958923572055.log
>> *[ERROR] Failed to execute goal
>> org.apache.maven.plugins:maven-compiler-plugin:3.1:compile
>> (default-compile) on project jenkins-example: Compilation failure*
>> *[ERROR] No compiler is provided in this environment. Perhaps you are
>> running on a JRE rather than a JDK?*
>> *[ERROR] -> [Help 1]*
>> *[ERROR] *
>> *[ERROR] To see the full stack trace of the errors, re-run Maven with the
>> -e switch.*
>> *[ERROR] Re-run Maven using the -X switch to enable full debug logging.*
>> *[ERROR] *
>> *[ERROR] For more information about the errors and possible solutions,
>> please read the following articles:*
>> *[ERROR] [Help 1]
>> http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
>> <http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException>*
>>
>> Now a side of having JAVA and MAVIN installed in CentOS, I was trying to
>> use JDK from java.sun.com(with an account from Oracle) and Maven from
>> Apache through Jenkins webservice in Global Tool Configuration but still I
>> have the same output errors.
>>
>> Also at Maven I add the name of maven_3_5_2 and change it in jenkinsfile
>> in that repo that I have cloned to my account.
>>
>> This is a noob question, but I need some guidence here =|
>>
>> Thanks!
>>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Jenkins Users" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/jenkinsci-users/PDdb0_8Lq7Q/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> jenkinsci-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/jenkinsci-users/b66813b4-7f34-4225-b7ba-b1ce461de3ee%40googlegroups.
> com
> <https://groups.google.com/d/msgid/jenkinsci-users/b66813b4-7f34-4225-b7ba-b1ce461de3ee%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 

Cyrille Le Clerc
Director of Product Management CloudBees, Inc.

[image: CloudBees-Logo.png]


M: +33-6.61.33.69.86
E: clecl...@cloudbees.com

Skype: cyrille.leclerc

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CADA0CVy1tDopJqaTe8hCKay_7gsn%2BKk6nZ%3DBBLDg%2BZMOqU_juw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to