Maven在本地(Windows / IntelliJ)和远程(Linux)之间的差异? [英] Differences in Maven builds between local (Windows / IntelliJ) and remote (Linux)?

查看:627
本文介绍了Maven在本地(Windows / IntelliJ)和远程(Linux)之间的差异?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I'm seeing something odd where I'm doing a Maven build that is implementing the swagger doclet for our API documentation (https://github.com/ryankennedy/swagger-jaxrs-doclet). When I do the build as reccommended there on the github page it builds fine locally on my Windows machine. The strangeness occurs when I try to do the exact same build on my Lunix vm and I get an error about unparsable POM files. A big difference I'm noticing is on the local machine there's a jar being pulled in that doesn't exist on the linux box: jaxrs-doclet-parent. This I'm assuming has something to do with the unparseable pom file error on the vm. Does anyone have an idea why a build would execute successfully on Windows (built via IntelliJ) but not on Linux?

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

Maven version is 3.0.3 on linux box and version is 3.2.1 on local windows machine

这是我所指的构建错误:

Here's the build error I am referring to:

[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


推荐答案

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

Turns out it was the maven version. On the linux box it was 3.0.3 and needed to be upgraded. Once I upgraded to 3.2.1 it built ok.

这篇关于Maven在本地(Windows / IntelliJ)和远程(Linux)之间的差异?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆