hudson持续集成,+sonar+maven+svn。
在任务配置里 填写了pom.xml而已。要在workspace放入pom.xml才能运行。但是每次构建时总是这样报错:
Found mavenVersion 3.0.4 from file jar:file:/D:/maven/lib/maven-core-3.0.4.jar!/META-INF/maven/org.apache.maven/maven-core/pom.properties
Parsing POMs
ERROR: Failed to parse POMs
org.apache.maven.project.ProjectBuildingException: Some problems were encountered while processing the POMs:
[FATAL] Non-parseable POM C:\Users\Administrator\.m2\repository\org\sonatype\oss\oss-parent\6\oss-parent-6.pom: Expected root element 'project' but found 'html' (position: START_TAG seen <html>... @1:6) @ C:\Users\Administrator\.m2\repository\org\sonatype\oss\oss-parent\6\oss-parent-6.pom, line 1, column 6
at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:325)
at hudson.maven.MavenEmbedder.buildProjects(MavenEmbedder.java:360)
at hudson.maven.MavenEmbedder.readProjects(MavenEmbedder.java:330)
at hudson.maven.MavenModuleSetBuild$PomParser.invoke(MavenModuleSetBuild.java:1175)
at hudson.maven.MavenModuleSetBuild$PomParser.invoke(MavenModuleSetBuild.java:1018)
at hudson.FilePath.act(FilePath.java:758)
at hudson.FilePath.act(FilePath.java:740)
at hudson.maven.MavenModuleSetBuild$RunnerImpl.parsePoms(MavenModuleSetBuild.java:711)
at hudson.maven.MavenModuleSetBuild$RunnerImpl.doRun(MavenModuleSetBuild.java:541)
at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:429)
at hudson.model.Run.run(Run.java:1366)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:414)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:145)
[DEBUG] Skipping watched dependency update for build: demo #10 due to result: FAILURE
Finished: FAILURE
在C:\Users\Administrator\.m2\repository\org\sonatype\oss\oss-parent\6\oss-parent-6.pom的文件是这样的:
<html>
<head><title>301 Moved Permanently</title></head>
<body bgcolor="white">
<center><h1>301 Moved Permanently</h1></center>
<hr><center>nginx/0.6.39</center>
</body>
</html>
求指导呀!
oss-parent-6.pom的地址转移了,所以出错
你可以手工下载一个这些jar包,放到这些目录下
参考 http://www.cnblogs.com/2018/archive/2011/09/22/2179100.html