1

Created a Maven archetype for Bukkit plugins at https://github.com/arun-gupta/bukkit-archetype. 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:

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

What am I missing ?

1 Answer 1

0

If all you got to was step 7.a.3 then you did not Release it.

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. 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. Which leads to the next question.


This may be obvious but did you add the release repo to your 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>
3
  • Close and Release were the missing steps. AIU, this will be synced with maven central every 2 hrs. Why would I need the staging repo in settings.xml ?
    – Arun Gupta
    Apr 26, 2014 at 2:09
  • You use the Staging repo to test if what you staged is what you want and that it works. Once tested then you Release it. If you aren't testing at the Staging point then there is no need to add it to your settings.xml. Apr 26, 2014 at 2:14
  • If you just want to Release then you just need to continue following the directions in the doc to the Release point. Apr 26, 2014 at 2:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.