Bonjour,
j'essaye d'importer un projet dans netbeans à partir d'un pom.xml existant.
après avoir indiquer le chemin de Maven dans netbeans, le projet se compile mais je rencontre deux types d'erreurs:
1) le premier (en rapport avec les tests) est dû au fait que Maven lance les test en même temps que la compile. J'ai donc essayé de faire un click droit sur le projet --> custom --> goals --> skip tests et j'obtiens le message suivant
2)Le deuxième est quand je ne skip pas les tests j'obtiens les messages d'rreurs suivants:
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 Scanning for projects... ------------------------------------------------------------------------ BUILD FAILURE ------------------------------------------------------------------------ You must specify at least one goal. Try 'mvn install' to build or 'mvn --help' for options See http://maven.apache.org for more information. ------------------------------------------------------------------------ For more information, run Maven with the -e switch ------------------------------------------------------------------------ Total time: < 1 second Finished at: Fri Jun 10 11:54:31 CEST 2011 Final Memory: 1M/15M
3) si malgré les erreurs de tests j'execute le projet j'obtiens le message d'erreur suivant:
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 cd C:\DMP\kit-editeur-dmp; JAVA_HOME=C:\\Java\\jdk16025 C:\\apache-maven-2.0.11-bin\\apache-maven-2.0.11\\bin\\mvn.bat clean install Scanning for projects... ------------------------------------------------------------------------ Building Unnamed - com.dmp.client:kit-editeur:jar:1.0.0 task-segment: [clean, install] ------------------------------------------------------------------------ [clean:clean] Deleting directory C:\DMP\kit-editeur-dmp\target [resources:resources] Using 'UTF-8' encoding to copy filtered resources. Copying 179 resources [compiler:compile] Compiling 3119 source files to C:\DMP\kit-editeur-dmp\target\classes [resources:testResources] Using 'UTF-8' encoding to copy filtered resources. Copying 1 resource [compiler:testCompile] Compiling 11 source files to C:\DMP\kit-editeur-dmp\target\test-classes [surefire:test] Surefire report directory: C:\DMP\kit-editeur-dmp\target\surefire-reports ------------------------------------------------------- T E S T S ------------------------------------------------------- Running com.dmp.kit_editeur.pkcs12.PKCS12SignTest 10 juin 2011 11:58:42 com.dmp.kit_editeur.util.Properties load INFO: Chargement du fichier config.properties Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.063 sec <<< FAILURE! Running com.dmp.kit_editeur.examples.util.ManifestXMLTest Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.281 sec <<< FAILURE! Running com.dmp.kit_editeur.examples.ConsultationTest 10 juin 2011 11:58:42 com.dmp.kit_editeur.util.Properties load INFO: URL SERVEUR = https://dev1.lps.dmp.gouv.fr/si-dmp-server/v1/services 10 juin 2011 11:58:42 org.springframework.context.support.AbstractApplicationContext prepareRefresh ...alors que je vois bien la classe class "org.slf4j.impl.StaticLoggerBinder" dans les dependance.
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 cd C:\DMP\kit-editeur-dmp; JAVA_HOME=C:\\Java\\jdk16025 C:\\apache-maven-2.0.11-bin\\apache-maven-2.0.11\\bin\\mvn.bat -Dexec.classpathScope=runtime "-Dexec.args=-classpath %classpath com.dmp.kit_editeur.examples.PatientServiceClient" -Dexec.executable=C:\\Java\\jdk16025\\bin\\java.exe process-classes org.codehaus.mojo:exec-maven-plugin:1.2:exec Scanning for projects... ------------------------------------------------------------------------ Building Unnamed - com.dmp.client:kit-editeur:jar:1.0.0 task-segment: [process-classes, org.codehaus.mojo:exec-maven-plugin:1.2:exec] ------------------------------------------------------------------------ [resources:resources] Using 'UTF-8' encoding to copy filtered resources. Copying 179 resources [compiler:compile] Nothing to compile - all classes are up to date [exec:exec] SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details. Exception in thread "main" java.lang.NoClassDefFoundError: org/slf4j/impl/StaticLoggerBinder at org.slf4j.LoggerFactory.<clinit>(LoggerFactory.java:60) at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:155) at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:131) at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:645) at com.dmp.kit_editeur.util.Properties.<clinit>(Properties.java:27) at com.dmp.kit_editeur.soapService.PatientService.<init>(PatientService.java:24) at com.dmp.kit_editeur.examples.PatientServiceClient.init(PatientServiceClient.java:51) at com.dmp.kit_editeur.examples.PatientServiceClient.main(PatientServiceClient.java:114) Caused by: java.lang.ClassNotFoundException: org.slf4j.impl.StaticLoggerBinder at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) ... 8 more ------------------------------------------------------------------------ BUILD ERROR ------------------------------------------------------------------------ Command execution failed. Embedded error: Process exited with an error: 1(Exit value: 1) ------------------------------------------------------------------------ For more information, run Maven with the -e switch ------------------------------------------------------------------------ Total time: 4 seconds Finished at: Fri Jun 10 12:05:19 CEST 2011 Final Memory: 15M/36M ------------------------------------------------------------------------
pour plus d'information, j'ai mis le pom.xml en piéce jointe
je sais que ce n'est pas evident, merci pour votre aide
Partager