在https://github.com/arun-gupta/bukkit-archetype为Bukkit插件创建了一个Maven原型。原型可以在本地安装,并用于正确生成项目:
mvn --batch-mode archetype:generate -DarchetypeGroupId=org.devoxx4kids.bukkit.plugins -DarchetypeArtifactId=bukkit-template -DartifactId=sample
按照Sonatype Maven资源库指南7a.3的顺序对插件进行了分步:
并将输出视为:
Uploaded: https://oss.sonatype.org/service/local/staging/deploy/maven2/org/devoxx4kids/bukkit/plugins/bukkit-template/1.0/bukkit-template-1.0.pom.asc (536 B at 0.3 KB/sec)
Uploading: https://oss.sonatype.org/service/local/staging/deploy/maven2/org/devoxx4kids/bukkit/plugins/bukkit-template/1.0/bukkit-template-1.0-sources.jar.asc
Uploaded: https://oss.sonatype.org/service/local/staging/deploy/maven2/org/devoxx4kids/bukkit/plugins/bukkit-template/1.0/bukkit-template-1.0-sources.jar.asc (536 B at 0.4 KB/sec)
从本地目录中删除了原型,希望从maven中心下载该插件。但是现在给出相同的命令来生成项目:
[INFO] --- maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom ---
[INFO] Generating project in Batch mode
[WARNING] Specified archetype not found.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6.693s
[INFO] Finished at: Fri Apr 25 17:17:31 PDT 2014
[INFO] Final Memory: 12M/305M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.2:generate (default-cli) on project standalone-pom: The desired archetype does not exist (org.devoxx4kids.bukkit.plugins:bukkit-template:1.0) -> [Help 1]
[ERROR]
在http://search.maven.org/#search%7Cga%7C1%7Cdevoxx4kids处搜索没有结果。
我错过了什么?
答案 0 :(得分:0)
如果你所要做的只是步骤7.a.3那么你没有Release it。
我想你需要关闭它吗?
一旦它是"分阶段"然后,您可以获取要在settings.xml中使用的URL。这导致了下一个问题。
这可能很明显,但您是否已将发布回购添加到settings.xml?
像
这样的东西<profile>
<id>acme-staging-repository</id>
<repositories>
<repository>
<id>jboss-staging-repository</id>
<name>Staging Maven Repository</name>
<url>https://repository.acme.org/nexus/content/repositories/acme_releases_staging_profile-1898</url>
<layout>default</layout>
<releases>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</releases>
<snapshots>
<enabled>false</enabled>
<updatePolicy>never</updatePolicy>
</snapshots>
</repository>
</repositories>
</profile>
<activeProfiles>
<activeProfile>acme-staging-repository</activeProfile>
</activeProfiles>