代码之家  ›  专栏  ›  技术社区  ›  JGlass

JBoss Fuse 6.3、Maven和settings。xml

  •  -1
  • JGlass  · 技术社区  · 8 年前

    我正试着跟着 Red Hat JBoss Fuse-6.3 Developer Guide . 我将所有内容添加到 Windows: Documents and Settings\User\.m2\settings.xml (不存在)根据文件。

    我使用的build命令是
    C:\Apps\apache-maven-3.5.0\bin\mvn archetype:generate -DarchetypeGroupId=io.fabric8.archetypes -DarchetypeArtifactId=karaf-soap-archetype -DarchetypeVersion=1.2.0.redhat-630187 -DgroupId=org.fusesource.example -DartifactId=cxf-basic -Dversion=1.0-SNAPSHOT -Dfabric8-profile=cxf-basic-profile

    我现在遇到以下错误:

    [INFO] Scanning for projects...
    [INFO]
    [INFO] ------------------------------------------------------------------------
    [INFO] Building Maven Stub Project (No POM) 1
    [INFO] ------------------------------------------------------------------------
    [INFO]
    [INFO] >>> maven-archetype-plugin:3.0.1:generate (default-cli) > generate-sources @ standalone-pom >>>
    [INFO]
    [INFO] <<< maven-archetype-plugin:3.0.1:generate (default-cli) < generate-sources @ standalone-pom <<<
    [INFO]
    [INFO]
    [INFO] --- maven-archetype-plugin:3.0.1:generate (default-cli) @ standalone-pom ---
    [INFO] Generating project in Interactive mode
    [INFO] Archetype repository not defined. Using the one from [io.fabric8.archetypes:karaf-soap-archetype:1.2.0.redhat-133] found in catalog remote
    [WARNING] The POM for io.fabric8.archetypes:karaf-soap-archetype:jar:1.2.0.redhat-630187 is missing, no dependency information available
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD FAILURE
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 3.056 s
    [INFO] Finished at: 2018-01-17T10:31:19-07:00
    [INFO] Final Memory: 12M/54M
    [INFO] ------------------------------------------------------------------------
    [ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:3.0.1:generate (default-cli) on project standalone-pom: The desired archetype does not exist (io.fabric8.archetypes:karaf-soap-archetype:1.2.0.redhat-630187) -> [Help 1]
    [ERROR]
    [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
    [ERROR] Re-run Maven using the -X switch to enable full debug logging.
    [ERROR]
    [ERROR] For more information about the errors and possible solutions, please read the following articles:
    [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
    
    C:\P\Projects\JBoss_Dev_Studio-10.1.0.GA_SideProjects\get-started>
    

    我确实看到了 archetype 存在。

    搜索 archetype does not exist (io.fabric8.archetypes:karaf-soap-archetype:1.2.0.redhat-630187 是的!这是找到的0个结果之一!

    1 回复  |  直到 8 年前
        1
  •  0
  •   JGlass    8 年前

    关键是这个
    [INFO] Archetype repository not defined. Using the one from [io.fabric8.archetypes:karaf-soap-archetype:1.2.0.redhat-133] found in catalog remote
    [WARNING] The POM for io.fabric8.archetypes:karaf-soap-archetype:jar:1.2.0.redhat-630187 is missing, no dependency information available

    我对Maven有点陌生——我一开始并不理解。然后我在谷歌上搜索了更多设置。xml—然后我发现提到了一个设置。xml也包含在 C:\Apps\apache-maven-3.5.0\conf

    我将Red Hat存储库添加到该文件中(因为它是完全空的),现在所有内容都可以正常构建。希望这可以帮助其他人比我更快地解决类似的问题,无论是关于jboss fuse还是maven没有正确设置,