首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >maven settings.xml

maven settings.xml
EN

Stack Overflow用户
提问于 2010-12-28 09:54:59
回答 4查看 6.4K关注 0票数 2

我正在尝试将maven1 project.xml转换为maven 2 pom.xml。

maven一:将插件转换为project.xml到pom.xml。

试过这些步骤

project.xml)

  • mvn

  • 安装了maven 2

  • cd项目-dir(其中有my

  • -e one:Installed

)

我有maven-one-plugin-1.2.jar$MAVEN_HOME/lib

Settings.xml具有以下本地存储库设置

代码语言:javascript
复制
<localRepository>path_to_mavenhome/lib</localRepository>
<offline>true</offline>
<pluginGroups>
    <pluginGroup>org.apache.maven.plugins:maven-one-plugin</pluginGroup>
</pluginGroups>
<profile>
    <id>central</id>
    <repositories>
        <repository>
            <id>local</id>
            <url>file://pathtomavenhome\lib</url>
            <layout>default</layout>
        </repository>
    </repositories>
</profile>

得到了这个错误消息

代码语言:javascript
复制
[INFO] Searching repository for plugin with prefix: 'one'.
[INFO] org.apache.maven.plugins:maven-one-plugin: checking for updates from central
[WARNING] repository metadata for: 'org.apache.maven.plugins:maven-one-plugin' could not be retrieved from repository: central due to an error: Error transferring file: Connection timed out: connect
[INFO] Repository 'central' will be blackliste

D

它不连接到本地存储库。在Settings.xml dir中没有$M2_HOME/.m2文件

EN

回答 4

Stack Overflow用户

发布于 2011-07-05 07:47:53

我不认为你有必要在这里有一个settings.xml。从主目录中删除它并尝试:

代码语言:javascript
复制
mvn one:convert

这应该是足够的。

如果您离线,这是无法工作的,除非您已经在您的本地存储库中有Maven one插件。你的settings.xml不太正确,目前你的任务过于复杂.

票数 3
EN

Stack Overflow用户

发布于 2012-05-09 11:00:24

你的步伐是正确的。

此错误表示您的互联网有问题。请验证网络可用性。

警告存储库元数据:“org.apache.maven.plugins:maven-one-plugin”无法从存储库中检索:中心原因是错误:错误传输文件:连接超时:连接

请按照以下链接进行参考: 1. http://maven.apache.org/guides/mini/guide-m1-m2.html 2. http://maven.apache.org/plugins/maven-one-plugin/

票数 2
EN

Stack Overflow用户

发布于 2011-09-27 23:11:51

试试mvn maven-one-plugin:convert

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/4545140

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档