部署编译
确认机器已经搭建好maven2的环境。
设置环境变量(本机eclipse路径,更多看http://code.google.com/p/testability-explorer/wiki/HowToContribute):
ECLIPSE_LAUNCHER_JAR=D:\eclipse-java-ganymede-SR1-win32\plugins\org.eclipse.osgi_3.4.2.R34x_v20080826-1230.jar
(否则提示错误:
Caused by: D:\project\google_testability_explorer\eclipse-plugin\build.xml:13: Java returned: 1
at org.apache.tools.ant.taskdefs.Java.execute(Java.java:108)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288))
取出源代码:svn checkout http://testability-explorer.googlecode.com/svn/trunk/ testability-explorer
cd testability-explorer
执行安装部署:mvn install
调整被测工程的pom.xml
在project节内加入:
<reporting> <plugins> <plugin> <groupId>com.google.testability-explorer</groupId> <artifactId>maven-testability-plugin</artifactId> <version>1.3.4-SNAPSHOT</version> </plugin> </plugins> </reporting> |
具体的版本号根据:D:\project\google_testability_explorer\maven-testability-plugin\target生成的jar定。
在 C:\Documents and Settings\jianzhao.liangjz\.m2\repository\com\google\testability-explorer\maven-testability-plugin\1.3.4-SNAPSHOT有maven-testability-plugin-1.3.4-SNAPSHOT.jar
从D:\project\google_testability_explorer\maven-testability-plugin\src\main\java\com\google\maven\TestabilityExplorerMojo.java 找到目标testability。