【问题标题】:Tycho Maven Offline BuildTycho Maven 离线构建
【发布时间】:2018-02-12 12:50:53
【问题描述】:

我们正在使用 Maven/Tycho 构建我们的 Eclipse RCP 应用程序。在 Eclipse 内部,一切都按预期工作

clean install

但是,由于我们的构建服务器是没有互联网连接的虚拟机,这将无法正常工作。我们运行

clean install --offline 

在上面,但它一直在说:

The POM for org.eclipse.tycho:tycho-maven-plugin:jar:0.25.0 is missing, no dependency information available

[ERROR] Some problems were encountered while processing the POMs:

Unresolveable build extension: Plugin org.eclipse.tycho:tycho-maven-plugin:0.25.0 or one of its dependencies could not be resolved: 
The following artifacts could not be resolved: org.eclipse.tycho:tycho-maven-plugin:jar:0.25.0, org.codehaus.plexus:plexus-utils:jar:1.1:
Cannot access central (https://repo.maven.apache.org/maven2) in offline mode and the artifact org.eclipse.tycho:tycho-maven-plugin:jar:0.25.0 has not been downloaded from it before. 

tycho-maven-plugin 是否可以离线使用?如果您需要回复,我们也可以提供 POM。

【问题讨论】:

    标签: eclipse maven build tycho


    【解决方案1】:

    是的,第谷确实支持--offline(至少从第谷 0.25 开始,它修复了Bug 461787)。但是,您引用的错误消息表明,您最初的 mvn clean install 并未完全下载第谷 本身

    检查 org.eclipse.tycho:tycho-maven-plugin:jar:0.25.0org.codehaus.plexus:plexus-utils:jar:1.1(来自错误消息)是否都存在于您的本地 Maven 存储库中,因为 Maven 抱怨它无法在那里找到它们。您是否同时清理了本地存储库?

    【讨论】:

    • 我假设本地仓库是 .m2/repository/ ?如果是这样,是的,它就在那里。
    • 这很奇怪。你可以删除~/.m2/repository/org/eclipse/tycho,然后执行online mvn clean install(应该再次下载所有org.eclipse.tycho 依赖项)然后执行offline mvn clean install
    • 不幸的是,这并没有解决它。我需要在任何地方设置本地存储库吗?还是 Maven 默认总是在 C:/.m2/repository 中查找它?
    • 这是默认设置。你可以运行mvn help:effective-settings 来检查是否有东西(很可能是你的settings.xml)覆盖了<localRepository>
    猜你喜欢
    • 2020-12-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-12-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多