JBoss Fuse 6.3,Maven和settings.xml

时间:2018-01-17 18:56:28

标签: maven jbossfuse

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

我正在使用的构建命令是
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 个答案:

答案 0 :(得分:0)

关键是这个
[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有点不相干 - 我先没理解它。然后我再搜索了一下settings.xml - 然后我发现了C:\Apps\apache-maven-3.5.0\conf

中包含的settings.xml的提及

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