我尝试用Maven命令行将Windows构建上传到Nexus:
mvn deploy:deploy-file -Durl=http://unity.apps.company.net/nexus/content/repositories/idesktopbuildimages-releases/ -DrepositoryId=idesktopbuildimages-releases -DgroupId=images.WINDOWS7X64EnterpriseSP0unattendedcapture.sources -DartifactId=install -Dversion=6.4 -Dpackaging=wim -Dfile=install.wim 得到了错误:
下载:http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom 警告未能检索org.apache.maven.plugins:maven-clean-plugin:2.4.1:插件org.apache.maven.plugins:maven-clean-plugin:2.4.1的插件描述符,或者其依赖项无法解决:无法读取org.apache.maven.plugins:maven-clean-plugin:jar:2.4.1的工件描述符
之所以发生这种情况,是因为我没有Internet访问权限(只有Intranet访问)。
那么,是否有可能转移到我的Maven命令中本地存储的Maven-install插件文件?
PS:我试过-DpomFile,但是输出结果是相同的。
解决方案:
将代理设置添加到我的settings.xml
发布于 2013-09-11 09:21:35
如果您没有internet访问权限,我假设您的intranet上有一个maven中心镜像。如果是这样的话,您必须配置您的settings.xml来声明镜像。因此,在您的settings.xml文件中添加类似的内容:
<mirrors>
<mirror>
<id>central-mirror</id>
<name>Local mirror of central repo</name>
<url>http://unity.apps.company.net/nexus/content/repositories/central</url>
<mirrorOf>central</mirrorOf>
</mirror>
</mirrors>编辑
其他需要考虑的事情:您可能需要配置一些代理设置(奇怪的是,它们还没有出现.)
请参阅this
发布于 2013-09-12 06:22:49
您必须设置您的设置文件以访问Nexus图书中描述的Nexus公共组,并确保您的Nexus服务器能够访问Central。
公共组的网址应为./nexus/content/ group / public。这个默认组中有"Central“存储库。
如果您使用的是与“版本”不同的组,则应确保中央存储库(或旧版本中的Maven Central )是排序组存储库列表的一部分,在http://books.sonatype.com/nexus-book/reference/confignx-sect-managing-groups.html#fig-group-config中可见
一旦设置完毕,您就可以在存储库视图中签出代理存储库Central本身,并确认可以使用http://books.sonatype.com/nexus-book/reference/confignx-sect-manage-repo.html#fig-repo-config中可见的"Browse“选项卡访问远程回购,从而确认中央存储库是可访问的。
如果此浏览无法工作,则Nexus服务器很可能会被内部代理服务器阻塞。如果是这种情况,则必须在Administration - Server -默认HTTP代理设置中配置它。
https://stackoverflow.com/questions/18735055
复制相似问题