Je débute avec maven et c'est la première fois que j'utilise le fichier pom.xml. le but est de faire ce cours pour pouvoir faire du java EE avec spring, mais je rencontre des problèmes de paramétrages dans mon pom.xml. eclipse oxygen 3 me renvoie des erreurs, les mèmes erreurs en mode terminal VT :
voici mon pom.xml je n'est fait que des copier/coller :1
symbol: method assertTrue(boolean)
location: class org.exemple.demo.AppTest
[INFO] 7 errors
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.151 s
[INFO] Finished at: 2018-04-22T20:09:27+02:00
[INFO] Final Memory: 16M/170M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:testCompile (default-testCompile) on project mon-appli: Compilation failure: Compilation failure:
[ERROR] /home/phipo/maven-projets/demo/mon-appli/src/test/java/org/exemple/demo/AppTest.java:[3,23] package junit.framework does not exist
[ERROR] /home/phipo/maven-projets/demo/mon-appli/src/test/java/org/exemple/demo/AppTest.java:[4,23] package junit.framework does not exist
[ERROR] /home/phipo/maven-projets/demo/mon-appli/src/test/java/org/exemple/demo/AppTest.java:[5,23] package junit.framework does not exist
[ERROR] /home/phipo/maven-projets/demo/mon-appli/src/test/java/org/exemple/demo/AppTest.java:[11,13] cannot find symbol
[ERROR] symbol: class TestCase
[ERROR] /home/phipo/maven-projets/demo/mon-appli/src/test/java/org/exemple/demo/AppTest.java:[26,19] cannot find symbol
[ERROR] symbol: class Test
[ERROR] location: class org.exemple.demo.AppTest
[ERROR] /home/phipo/maven-projets/demo/mon-appli/src/test/java/org/exemple/demo/AppTest.java:[28,20] cannot find symbol
[ERROR] symbol: class TestSuite
[ERROR] location: class org.exemple.demo.AppTest
[ERROR] /home/phipo/maven-projets/demo/mon-appli/src/test/java/org/exemple/demo/AppTest.java:[36,9] cannot find symbol
[ERROR] symbol: method assertTrue(boolean)
[ERROR] location: class org.exemple.demo.AppTest
[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/d...ilureException
Code XML : 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83 1 <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <!-- =============================================================== --> <!-- Informations du projet --> <!-- =============================================================== --> <!-- ===== Informations Maven ===== --> <groupId>org.exemple.demo</groupId> <artifactId>mon-appli</artifactId> <version>1.1-SNAPSHOT</version> <packaging>jar</packaging> <!-- ===== Informations générales ===== --> <name>Mon Application</name> <description> La super application qui sert à faire ceci/cela... </description> <url>http://www.exemple.org/mon-appli</url> <!-- ===== Organisation ===== --> <organization> <name>Mon Entreprise</name> <url>http://www.exemple.org</url> </organization> <!-- ===== Licences ===== --> <licenses> <license> <name>Apache License, Version 2.0</name> <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url> </license> </licenses> <properties> <apache.struts.version>2.5.10.1</apache.struts.version> </properties> <dependencies> <!-- ===== Apache Struts ===== --> <dependency> <groupId>org.apache.struts</groupId> <artifactId>struts2-core</artifactId> <version>${apache.struts.version}</version> </dependency> <dependency> <groupId>org.apache.struts</groupId> <artifactId>struts2-json-plugin</artifactId> <version>${apache.struts.version}</version> </dependency> </dependencies> <!-- =============================================================== --> <!-- Build --> <!-- =============================================================== --> <build> <!-- Gestion des plugins (version) --> <pluginManagement> <plugins> <!-- Plugin responsable de la génération du fichier JAR --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> <version>3.0.2</version> </plugin> </plugins> </pluginManagement> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> <configuration> <archive> <!-- Création du Manifest pour la définition de la classe Main --> <manifest> <mainClass>org.exemple.demo.App</mainClass> </manifest> </archive> </configuration> </plugin> </plugins> </build> </project>
j'essai des compiler avec maven comme cela est précisé dans le cours mais je ne vois pas ou est mon erreur !
Je travail sous Fedora 27 serveur 64 bits....
Salutations
Philippe
Partager