J'ai écrit mon projet maven dans Netbeans.J'ai écrit des tests pour mon projet (dao, service ..). Tous les tests ont raison, mais quand je construis ou tester mon projet Maven montre qu'il n'y a pas de tests à l'aide compile.I'm maven-plugin-Surefire, donc l'inclure à la pom.xml:J'ai des problèmes avec tester mon projet par maven-surefire-plugin
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.10</version>
<dependencies>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-junit47</artifactId>
<version>2.10</version>
</dependency>
</dependencies>
<configuration>
<testFailureIgnore>true</testFailureIgnore>
<reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>
</configuration>
Je pense que quelque chose de mal avec surefire-plugin ..
Cest:
Scanning for projects...
------------------------------------------------------------------------
Building Employeers 1.0.0-BUILD-SNAPSHOT
------------------------------------------------------------------------
[aspectj:compile]
[resources:resources]
[debug] execute contextualize
Using 'UTF-8' encoding to copy filtered resources.
Copying 4 resources
[compiler:compile]
Nothing to compile - all classes are up to date
[aspectj:test-compile]
[resources:testResources]
[debug] execute contextualize
Using 'UTF-8' encoding to copy filtered resources.
Copying 1 resource
[compiler:testCompile]
Nothing to compile - all classes are up to date
[surefire:test]
Surefire report directory: C:\Users\Администратор\Documents\NetBeansProjects\Employeers\target\surefire-reports
Using configured provider org.apache.maven.surefire.junitcore.JUnitCoreProvider
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Error: An unexpected error occurred while trying to open file C:\Users\?????????????\Documents\NetBeansProjects\Employeers\target\surefire\surefirebooter472050683580306804.jar
Results :
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[war:war]
Packaging webapp
Assembling webapp [Employeers] in [C:\Users\Администратор\Documents\NetBeansProjects\Employeers\target\Employeers-1.0.0-BUILD-SNAPSHOT]
Processing war project
Copying webapp resources [C:\Users\Администратор\Documents\NetBeansProjects\Employeers\src\main\webapp]
Webapp assembled in [590 msecs]
Building war: C:\Users\Администратор\Documents\NetBeansProjects\Employeers\target\Employees.war
Warning: selected war files include a WEB-INF/web.xml which will be ignored
(webxml attribute is missing from war task, or ignoreWebxml attribute is specified as 'true')
------------------------------------------------------------------------
BUILD SUCCESS
------------------------------------------------------------------------
Total time: 5.258s
Finished at: Fri Jul 27 19:47:07 EEST 2012
Final Memory: 6M/16M
------------------------------------------------------------------------
Merci beaucoup Orique.Y at-il des solutions possibles sans changer de répertoire? – ema
Difficile à dire. Ressemble à un problème d'encodage. Avez-vous défini UTF-8 comme encodage par défaut pour votre projet? [link] (http://maven.apache.org/general.html#encoding-warning). S'il vous plaît poster pom.xml alors peut-être que d'autres peuvent vous aider. – orique
UTF-8 est défini par défaut – ema