Bonjour,
J'essaye d'utiliser Cobertura mais je rencontre un problème :
Lorsque que j’exécute un mvn cobertura:cobertura, je constate sur le site que pour toutes mes classes, la couverture est de 0%. De plus, pour chaque classe, il est indiqué "Unable to locate com/client/projet/class.java. Have you specified the source directory?".
Voici le pom.xml :
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 <build> <plugins> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>cobertura-maven-plugin</artifactId> <version>2.4</version> <executions> <execution> <id>clean</id> <phase>pre-site</phase> <goals> <goal>clean</goal> </goals> </execution> <execution> <id>instrument</id> <phase>site</phase> <goals> <goal>instrument</goal> <goal>cobertura</goal> </goals> </execution> </executions> </plugin> </plugins> </build> <reporting> <plugins> <plugin> <!-- use mvn cobertura:cobertura to generate cobertura reports --> <groupId>org.codehaus.mojo</groupId> <artifactId>cobertura-maven-plugin</artifactId> <version>2.4</version> <configuration> <formats> <format>html</format> <format>xml</format> </formats> </configuration> </plugin> </plugins> </reporting>
Mes fichiers java se trouvent dans src/main/java et mes fichiers classes se trouvent dans target/com/client/projet/.
Est-que quelqu'un sait d'où pourrait venir le problème?
Merci pour votre aide =D.
Partager