我在Netbeans.I编写了我的maven项目,为我的项目编写了测试(dao,service ..)。所有的测试都是正确的,但是当我建立或测试我的项目的Maven显示有使用maven-万无一失,插件compile.I'm没有测试,所以它包括对pom.xml中:通过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>
我觉得有什么不妥神火-插件..
这就是:
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
------------------------------------------------------------------------
谢谢Orique很多。有没有可能的解决方案,而不改变目录? – ema 2012-07-27 19:33:40
很难分辨。看起来像一个编码问题。您是否将UTF-8设置为项目的默认编码? [链接](http://maven.apache.org/general.html#encoding-warning)。请发布pom.xml,以便其他人可以提供帮助。 – orique 2012-07-27 19:57:55
UTF-8被设置为默认值 – ema 2012-09-06 08:52:54