相关疑难解决方法(0)

在Eclipse中创建一个Maven项目抱怨"无法解析原型"

我完全是Maven的新手.我想用Eclipse Juno EE和原型"webapp"创建一个Maven项目.我安装了"Maven Integration for Eclipse WTP(孵化)",我还安装了"Maven Integration for Eclipse"(在Eclipse Marketplace的Installed选项卡上找到它).当我尝试从File-> New_> Maven Project创建新项目时,我得到错误:

Could not resolve archetype org.apache.maven.archetypes:maven-archetype-webapp:RELEASE from any of the configured repositories.
Could not resolve artifact org.apache.maven.archetypes:maven-archetype-webapp:pom:RELEASE
Failed to resolve version for org.apache.maven.archetypes:maven-archetype-webapp:pom:RELEASE: Could not find metadata org.apache.maven.archetypes:maven-archetype-webapp/maven-metadata.xml in local (C:\Documents and Settings\PEP35KD\.m2\repository)
Failed to resolve version for org.apache.maven.archetypes:maven-archetype-webapp:pom:RELEASE: Could not find metadata org.apache.maven.archetypes:maven-archetype-webapp/maven-metadata.xml in local (C:\Documents and Settings\PEP35KD\.m2\repository)

它适用于各种原型.我正在使用代理,我使用以下内容在C:\ Documents and Settings\PEP35KD.m2 \下创建文件settings.xml:

<proxies>
    <proxy>
        <id>myId</id>
        <active>true</active>
        <protocol>http</protocol>
        <username>rete\pep35kd</username>
        <password>XXXX</password>
        <host>XXXX</host>
        <port>8080</port> …
Run Code Online (Sandbox Code Playgroud)

java eclipse maven

63
推荐指数
5
解决办法
34万
查看次数

无法在eclipse中创建Maven项目

我在企业防火墙后面的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> …
Run Code Online (Sandbox Code Playgroud)

eclipse maven

29
推荐指数
3
解决办法
12万
查看次数

标签 统计

eclipse ×2

maven ×2

java ×1