我想编译一个在一台Ubuntu机器上工作但在另一台机器上不工作的Maven项目,我不知道为什么。它使用Play框架。该项目的pom.xml文件的开头包含:“不可解析的父POM”与使用Maven的Play框架项目
<parent>
<groupId>org.play</groupId>
<artifactId>play-parent</artifactId>
<version>1.1</version>
</parent>
当我运行mvn安装,我得到这个错误:
我从另一个复制[INFO] Scanning for projects...
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project ... pom.xml) has 1 error
[ERROR] Non-resolvable parent POM: Failure to find org.play:play-parent:pom:1.1 in
http://repo.maven.apache.org/maven2 was cached in the local repository, resolution
will not be reattempted until the update interval of central has elapsed or
updates are forced and 'parent.relativePath' points at wrong local POM @
line 5, column 11 -> [Help 2]
Maven的settings.xml文件机载:
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">
<localRepository/>
<interactiveMode/>
<usePluginRegistry/>
<offline/>
<pluginGroups/>
<servers>
artifactory ids, logins and passwords
</servers>
<mirrors/>
<proxies/>
<profiles/>
<activeProfiles/>
</settings>
我已经玩框架安装并运行“玩安装Maven”的指示来安装游戏行家模块:http://www.playframework.org/modules/maven-1.0/home我假设我需要以某种方式告诉Maven的地方这个mod ule是。我不想修改pom.xml文件,因为它在另一台机器上工作正常,我宁愿以更好的方式解决这个问题。
有没有人知道什么是错的或有什么暗示我可以做什么?
“另一台机器的settings.xml文件中有我复制到另一台机器上的文件。” - 在其settings.xml文件中有*什么*如果你想解释你的settings.xml文件的答案,你应该在问题中包含该文件的内容:) – eis
谢谢,补充。 :) –