我正在尝试编译一个 Maven 项目,该项目可以在一台 Ubuntu 机器上运行,但不能在另一台机器上运行,我不知道为什么。它使用 Play 框架。项目的 pom.xml 文件的开头包含:
<parent>
<groupId>org.play</groupId>
<artifactId>play-parent</artifactId>
<version>1.1</version>
</parent>
当我运行 mvn install 时,我收到此错误:
[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>
我安装了 play 框架并按照指示运行“play install maven”以安装 play maven 模块:http ://www.playframework.org/modules/maven-1.0/home我假设我需要以某种方式告诉 Maven 在哪里这个模块是。我不想修改 pom.xml 文件,因为它在另一台机器上工作,我宁愿以更好的方式解决这个问题。
有谁知道出了什么问题或对我能做什么有任何提示?