Maven在本地(Windows / IntelliJ)和远程(Linux)之间的差异?

时间:2014-07-24 15:12:43

标签: java maven intellij-idea jax-rs swagger

我看到了一些奇怪的地方,我正在做一个Maven构建,它正在为我们的API文档(https://github.com/ryankennedy/swagger-jaxrs-doclet)实现swagger doclet。当我在github页面上进行构建时,它在我的Windows机器上本地构建良好。当我尝试在我的Lunix虚拟机上执行完全相同的构建时出现奇怪现象,并且我收到有关不可解析的POM文件的错误。我注意到的一个很大的区别就是在本地机器上有一个罐子被拉进来,而linux盒子上却没有:jaxrs-doclet-parent。我假设这与vm上的不可解析的pom文件错误有关。有没有人知道为什么构建会在Windows上成功执行(通过IntelliJ构建)而不是在Linux上执行?

Maven版本在Linux机器上是3.0.3,在本地Windows机器上版本是3.2.1

这是我所指的构建错误:

[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 37.339s
[INFO] Finished at: Thu Jul 24 12:38:36 EDT 2014
[INFO] Final Memory: 32M/76M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:2.9.1:javadoc (generate-service-docs) on project scapi-ws: An error has occurred in JavaDocs report generation: Unable to build the Maven project for the artifact:groupId = 'com.hypnoticocelot'
[ERROR] artifactId = 'jaxrs-doclet'
[ERROR] version = '0.0.4-SNAPSHOT': 1 problem was encountered while building the effective model
[ERROR] [FATAL] Non-parseable POM /home/gwalker/.m2/repository/com/hypnoticocelot/jaxrs-doclet/0.0.4-SNAPSHOT/jaxrs-doclet-0.0.4-SNAPSHOT.pom: end tag name </body> must match start tag name <hr> from line 5 (position: TEXT seen ...</center>\r\n</body>... @6:8)  @ line 6, column 8

1 个答案:

答案 0 :(得分:0)

原来这是maven版本。在linux盒子上它是3.0.3并且需要升级。一旦我升级到3.2.1,它就构建好了。