问题描述
- 工程pom里已配置关了test, 但想命令行临时运行一下test,mvn命令是怎样的?
-
我的Maven工程pom.xml里已配置关了test,maven-surefire-plugin
2.7.1default-test
testtest
<!-- true -->
<!-- true -->
true但我想命令行运行,临时打开test跑一下,
我用 mvn test -DskipTests=false 但仍然是skip跳过
D:GIT_WorkiVIEW8.5ossxmlxmlserviceapi>mvn test -DskipTests=false
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building xmlservice-api 8.2.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ xmlservice-api ---
[debug] execute contextualize
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 2 resources
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) @ xmlservice-api ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- native2ascii-maven-plugin:1.0-beta-1:native2ascii (native2ascii) @ xmlservice-api ---
[INFO] Includes: [*.properties]
[INFO] Excludes: []
[INFO] Processing D:GIT_WorkiVIEW8.5ossxmlxmlserviceapitargetclassesxmlservicebiz.properties
[INFO] Processing D:GIT_WorkiVIEW8.5ossxmlxmlserviceapitargetclassesxmlservicebiz_zh_CN.properties
[INFO]
[INFO] --- maven-resources-plugin:2.5:testResources (default-testResources) @ xmlservice-api ---
[debug] execute contextualize
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 4 resources
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:testCompile (default-testCompile) @ xmlservice-api ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:2.7.1:test (default-test) @ xmlservice-api ---
[INFO] Tests are skipped.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.939s
[INFO] Finished at: Fri Sep 18 17:47:24 CST 2015
[INFO] Final Memory: 11M/371M
[INFO] ------------------------------------------------------------------------临时打开test跑一下的mvn命令应该是怎样的呢?
解决方案
pom.xml 已经配置成了
org.apache.maven.plugins
maven-surefire-plugin
2.8
true
解决方案二:
靠,好像都贴不了 xml
pom.xml 已经配置成了 true
解决方案三:
靠,好像都贴不了 xml
pom.xml 已经配置成了 skipTests 为 true
“true ”