简体   繁体   English

mvn版本:不上传原型

[英]mvn release:perform not uploading the archetype

Created a Maven archetype for Bukkit plugins at https://github.com/arun-gupta/bukkit-archetype . https://github.com/arun-gupta/bukkit-archetype为Bukkit插件创建了Maven原型。 The archetype can be installed locally and used to generated the project correctly as: 该原型可以安装在本地,并可以通过以下方式正确生成项目:

mvn --batch-mode archetype:generate -DarchetypeGroupId=org.devoxx4kids.bukkit.plugins -DarchetypeArtifactId=bukkit-template -DartifactId=sample

Staged the plugin following the Sonatype Maven Repository Guide up to 7a.3 at: 按照《 Sonatype Maven存储库指南》(直至7a.3)上载插件,网址为:

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

and saw the output as: 并看到输出为:

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)

Removed the archetype from local directory hoping that the plugin will be downloaded from maven central. 从本地目录中删除了原型,希望插件将从maven Central下载。 But giving the same command to generate the project now gives: 但是,给出相同的命令来生成项目现在可以得到:

[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] 

Searching at http://search.maven.org/#search%7Cga%7C1%7Cdevoxx4kids gives no results. http://search.maven.org/#search%7Cga%7C1%7Cdevoxx4kids中搜索没有结果。

What am I missing ? 我想念什么?

If all you got to was step 7.a.3 then you did not Release it . 如果您只需要执行步骤7.a.3,那么您就不会释放它

I think you need to Close it? 我认为您需要关闭吗?

  • Log into the nexus repo. 登录到网络仓库。
  • Click on the link "Staging Repositories" on the left side under the section called "Build Promotion". 单击左侧“构建升级”下的“临时存储库”链接。
  • Next, select the checkbox next to the staging repository which contains your userid. 接下来,选中包含您的用户ID的登台存储库旁边的复选框。 Then click on the "Close" button at the top of the repository list. 然后单击存储库列表顶部的“关闭”按钮。
  • "Closing" the repository does not mean that the artifacts are promoted, it only means that no additional artifacts can be added. “关闭”存储库并不意味着升级了工件,仅意味着不能添加任何其他工件。

Once it is "Staged" you can then get the URL to be used in your settings.xml. 一旦“暂存”,您就可以在settings.xml中使用该URL。 Which leads to the next question. 这就引出了下一个问题。


This may be obvious but did you add the release repo to your settings.xml? 这可能很明显,但是您是否将发行版回购添加到settings.xml中?

Something like 就像是

<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>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM