Bonjour,
Je dois mettre en place un serveur d'integration continue j'utilise TortoiseSVN, Jenkins et SonarQube pour la qualite.
Je me sert de Sonar-Runner pour l'analyse des projets jusque la tout fonctionne bien.
On m'a ensuite demander d'ajouter Maven pour les projet en Java, je l'ai installé et configurer, j'ai lancé une analyse Sonar ,sans passer par Jenkins, qui a fonctionné j'ai ensuite creer un jobs Jenkins sans utiliser Sonar a la suite du build et ca a fonctionner mais lorsque j'ajoute l'analyse Sonar apres le build je me prend une erreur :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48 Démarré par l'utilisateur anonymous Building in workspace C:\Program Files\Jenkins\jobs\exemple\workspace FSSCM.checkout \\C:\Users\forget\Documents\sonar-examples-master\sonar-examples-master\projects\languages\java\maven\java-maven-simple to C:\Program Files\Jenkins\jobs\exemple\workspace FSSCM.clearWorkspace... New file: pom.xml New file: README.md New file: src\main\java\example\One.java New file: target\sonar\sonar-pom.xml FSSCM.check completed in 237 milliseconds Parsing POMs [workspace] $ java -cp "C:\Program Files\Jenkins\plugins\maven-plugin\WEB-INF\lib\maven31-agent-1.5.jar;C:\Users\forget\Documents\apache-maven-3.2.1\boot\plexus-classworlds-2.5.1.jar;C:\Users\forget\Documents\apache-maven-3.2.1/conf/logging" jenkins.maven3.agent.Maven31Main C:\Users\forget\Documents\apache-maven-3.2.1 "C:\Program Files\Jenkins\war\WEB-INF\lib\remoting-2.36.jar" "C:\Program Files\Jenkins\plugins\maven-plugin\WEB-INF\lib\maven31-interceptor-1.5.jar" "C:\Program Files\Jenkins\plugins\maven-plugin\WEB-INF\lib\maven3-interceptor-commons-1.5.jar" 53338 <===[JENKINS REMOTING CAPACITY]===>channel started log4j:WARN No appenders could be found for logger (org.apache.commons.beanutils.converters.BooleanConverter). log4j:WARN Please initialize the log4j system properly. Executing Maven: -B -f C:\Program Files\Jenkins\jobs\exemple\workspace\pom.xml install [INFO] Scanning for projects... [INFO] [INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1 [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building Simple Java Maven Project 1.0-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ example-java-maven --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] skip non existing resourceDirectory C:\Program Files\Jenkins\jobs\exemple\workspace\src\main\resources [INFO] [INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) @ example-java-maven --- [INFO] Compiling 1 source file to C:\Program Files\Jenkins\jobs\exemple\workspace\target\classes [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 4.702 s [INFO] Finished at: 2014-04-16T17:16:56+01:00 [INFO] Final Memory: 7M/19M [INFO] ------------------------------------------------------------------------ [JENKINS] Archiving C:\Program Files\Jenkins\jobs\exemple\workspace\pom.xml to org.codehaus.sonar/example-java-maven/1.0-SNAPSHOT/example-java-maven-1.0-SNAPSHOT.pom [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.5.1:compile (default-compile) on project example-java-maven: Fatal error compiling: tools.jar not found: C:\Program Files\Jenkins\jre\..\lib\tools.jar -> [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/d...utionException channel stopped Saut de l'analyse sonar suite à un mauvais status de construction FAILURE Finished: FAILUREc:\Users>java -version
java version "1.7.0_51"
Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
Java HotSpot(TM) Client VM (build 24.51-b03, mixed mode, sharing)c:\Users>echo %JAVA_HOME%
C:\Program Files\Java\jre7
Partager