我在企业防火墙后面的Windows 7机器上安装了Eclipse Luna和Maven 3.2.3.
尝试从原型创建项目会导致以下错误:
无法解析原型org.apache.maven.archetypes:maven-archetype-quickstart:来自任何已配置存储库的RELEASE.
无法解析工件org.apache.maven.archetypes:maven-archetype-quickstart:pom:RELEASE
无法解析org.apache.maven.archetypes的版本:maven-archetype- quickstart:pom:RELEASE:无法在本地找到元数据org.apache.maven.archetypes:maven-archetype-quickstart/maven-metadata.xml(C :\用户\ xxxx.m2 \库)
无法解析org.apache.maven.archetypes的版本:maven-archetype-quickstart:pom:RELEASE:无法在本地找到元数据org.apache.maven.archetypes:maven-archetype-quickstart/maven-metadata.xml(C :\用户\ xxxx.m2 \库)
配置代理详细信息.m2/settings.xml并从archtype生成maven项目在命令行中正常工作.
我试图从这里应用解决方案但没有工作.远程目录也不可访问.我认为这是Eclipse的网络设置的问题.我也查看了这个错误报告,试图找到一些线索,并不能真正理解如何实现变通方法.
这是我的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">
<servers>
<server>
<id>nexus</id>
<username>xxxx@xxxx.com</username>
<password>{XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX}</password>
</server>
<server>
<id>deployment</id>
<username>xxxx@xxxx.com</username>
<password>{XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX}</password>
</server>
</servers>
<mirrors>
<mirror>
<!--This sends everything else to /public -->
<id>nexus</id>
<mirrorOf>*</mirrorOf>
<url>https://nexus-int.xxxx.xxxx.com/nexus/content/groups/public</url>
</mirror>
</mirrors>
<profiles>
<profile>
<id>nexus</id>
<!--Enable snapshots for the built in central repo to direct -->
<!--all requests to nexus via the mirror -->
<repositories>
<repository>
<id>central</id>
<url>http://central</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>central</id>
<url>http://central</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
<activeProfiles>
<!--make the profile active all the time -->
<activeProfile>nexus</activeProfile>
</activeProfiles>
</settings>
Run Code Online (Sandbox Code Playgroud)
有任何想法吗?
谢谢
托梅尔
fre*_*oft 58
这里问题相同,解决了.
我将解释问题和解决方案,以帮助他人.
我的软件是:
Windows 7
Eclipse 4.4.1 (Luna SR1)
m2e 1.5.0.20140606-0033
(from eclipse repository: http://download.eclipse.org/releases/luna)
Run Code Online (Sandbox Code Playgroud)
我通过代理访问互联网.
我的问题是一样的:
经过大量的尝试和错误,并阅读了很多页面,我终于找到了解决方案来解决它.解决方案的一些重点:
该解决方案是:
Run Code Online (Sandbox Code Playgroud)<settings> <proxies> <proxy> <active>true</active> <protocol>http</protocol> <host>YOUR.PROXY.IP.OR.NAME</host> <port>YOUR PROXY PORT</port> <username>YOUR PROXY USERNAME (OR EMPTY IF NOT REQUIRED)</username> <password>YOUR PROXY PASSWORD (OR EMPTY IF NOT REQUIRED)</password> <nonProxyHosts>YOUR PROXY EXCLUSION HOST LIST (OR EMPTY)</nonProxyHosts> </proxy> </proxies> </settings>
最后,我想向m2e开发人员提出建议,使配置更容易.从Internet(从存储库)安装m2e后,m2e应检查Eclipse是否使用代理(首选项>常规>网络连接).如果Eclipse使用代理,则m2e应该向用户显示一个对话框:
m2e has detected that Eclipse is using a proxy to access to the internet.
Would you like me to create a User settings file (settings.xml) for the embedded
Maven software?
[ Yes ] [ No ]
Run Code Online (Sandbox Code Playgroud)
如果用户单击Yes,则m2e应通过从Eclipse首选项复制代理值来自动创建"settings.xml"文件.
| 归档时间: |
|
| 查看次数: |
115566 次 |
| 最近记录: |