mvn release:执行不上传原型

时间:2014-04-26 00:23:57

标签: maven bukkit archetypes

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的顺序对插件进行了分步:

https://docs.sonatype.org/display/Repository/Sonatype+OSS+Maven+Repository+Usage+Guide#SonatypeOSSMavenRepositoryUsageGuide-7a.3.StageaRelease

并将输出视为:

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处搜索没有结果。

我错过了什么?

1 个答案:

答案 0 :(得分:0)

如果你所要做的只是步骤7.a.3那么你没有Release it

我想你需要关闭它吗?

  • 登录nexus回购。
  • 点击链接" Staging Repositories"在名为" Build Promotion"的部分的左侧。
  • 接下来,选中包含您的用户ID的暂存存储库旁边的复选框。然后点击"关闭"存储库列表顶部的按钮。
  • "关闭"存储库并不意味着工件被提升,它只意味着不能添加其他工件。

一旦它是"分阶段"然后,您可以获取要在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>