我正在尝试生成一个SNAPSHOT maven原型,将其发布到Sonatype的OSS回购:https://oss.sonatype.org/content/repositories/snapshots/funcatron/starter/
发布正确。但是,当我尝试从SNAPSHOT mvn archetype:generate
时,事情不起作用:
mvn archetype:generate -B \
-DarchetypeGroupId=funcatron \
-DarchetypeArtifactId=starter \
-DarchetypeVersion=0.3.0-SNAPSHOT \
-DgroupId=my.stellar \
-DartifactId=thang \
-DarchetypeRepository=https://oss.sonatype.org/content/repositories/snapshots/
未找到原型:
[INFO] Generating project in Batch mode
[WARNING] Archetype not found in any catalog. Falling back to central repository.
[WARNING] Add a repsoitory with id 'archetype' in your settings.xml if archetype's repository is elsewhere.
[WARNING] The POM for funcatron:starter:jar:0.3.0-SNAPSHOT is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
那么......我做错了什么?我是否应该添加pom.xml
来发布SNAPSHOT工件,以便通过mvn archetype:generate
找到它?
谢谢!
答案 0 :(得分:0)
在您的settings.xml中添加原型存储库:
<repository>
<id>archetype</id>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
</repository>