之前报错如下
Started by user anonymous Updating file:///D:/MySVNRepo revision: 2013-7-15 15:20:33 depth:infinity ignoreExternals: false At revision 6 no change for file:///D:/MySVNRepo since the previous build [workspace] $ E:\mavon\apache-maven-3.1.0-alpha-1-bin\apache-maven-3.1.0-alpha-1\bin\mvn.bat test indtall [INFO] Scanning for projects... [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 0.172s [INFO] Finished at: Mon Jul 15 15:20:37 CST 2013 [INFO] Final Memory: 4M/15M [INFO] ------------------------------------------------------------------------ [ERROR] The goal you specified requires a project to execute but there is no POM in this directory (C:\Documents and Settings\chaigw\.hudson\jobs\youare\workspace). Please verify you invoked Maven from the correct directory. -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MissingProjectException Finished: FAILURE
看异常就知道 运行 mvn 方法 找不到 pom.xml文件了,但是建立过程并未找项目,因为流程是,进行编译的时候自动建立一个工作空间,然后找pom文件,说明路径一定配置有问题,问题在于svn的路径要写上项目名
file:///D:/MySVNRepo/mavenT
这个改完了就好了,如下
Started by user anonymous Checking out a fresh workspace because there's no workspace at C:\Documents and Settings\chaigw\.hudson\jobs\no\workspace Cleaning workspace C:\Documents and Settings\chaigw\.hudson\jobs\no\workspace Checking out file:///D:/MySVNRepo/mavenT revision: 2013-7-15 15:37:08 depth:infinity ignoreExternals: false A .settings A .settings\org.eclipse.jdt.core.prefs A .settings\org.maven.ide.eclipse.prefs A target A target\maven-archiver A target\maven-archiver\pom.properties AU target\mavenT-0.0.1.jar A src A src\test A src\test\java A src\test\resources A src\main A src\main\java A src\main\java\com A src\main\java\com\maven A src\main\java\com\maven\MavenWorld.java A src\main\java\com\maven\MavenWorldImpl.java A src\main\resources A pom.xml A .project A .classpath At revision 6 [workspace] $ mvn.bat install [INFO] Scanning for projects... [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building mavenT 0.0.1 [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ mavenT --- [WARNING] Using platform encoding (GBK actually) to copy filtered resources, i.e. build is platform dependent! [INFO] Copying 0 resource [INFO] [INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) @ mavenT --- [WARNING] File encoding has not been set, using platform encoding GBK, i.e. build is platform dependent! [INFO] Compiling 2 source files to C:\Documents and Settings\chaigw\.hudson\jobs\no\workspace\target\classes [INFO] [INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ mavenT --- [WARNING] Using platform encoding (GBK actually) to copy filtered resources, i.e. build is platform dependent! [INFO] Copying 0 resource [INFO] [INFO] --- maven-compiler-plugin:2.5.1:testCompile (default-testCompile) @ mavenT --- [INFO] Nothing to compile - all classes are up to date [INFO] [INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ mavenT --- [INFO] [INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ mavenT --- [INFO] Building jar: C:\Documents and Settings\chaigw\.hudson\jobs\no\workspace\target\mavenT-0.0.1.jar [INFO] [INFO] --- maven-install-plugin:2.4:install (default-install) @ mavenT --- [INFO] Installing C:\Documents and Settings\chaigw\.hudson\jobs\no\workspace\target\mavenT-0.0.1.jar to E:\mavon\apache-maven-3.1.0-alpha-1-bin\repo\proj\mavenT\0.0.1\mavenT-0.0.1.jar [INFO] Installing C:\Documents and Settings\chaigw\.hudson\jobs\no\workspace\pom.xml to E:\mavon\apache-maven-3.1.0-alpha-1-bin\repo\proj\mavenT\0.0.1\mavenT-0.0.1.pom [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 8.235s [INFO] Finished at: Mon Jul 15 15:37:20 CST 2013 [INFO] Final Memory: 9M/22M [INFO] ------------------------------------------------------------------------ Finished: SUCCESS