Nexus Maven Archetype repository is not updated when deploying an archetype artefact

3.3k views Asked by At

A custom Maven Archetype, developed to generate an application template for our team, is not recognised by Nexus 1.9.2 as a valid archetype.

Running command mvn clean deploy properly installs the archetype locally (i.e. it updates the local ~/.m2/archetype-catalog.xml), uploads it to the designated Nexus repository, but a corresponding Nexus archetype-catalog.xml is not updated.

The groupId of the developed archetype is fielden. Running mvn archetype:generate -Dfilter=fielden: reveals only the locally deployed artefact.

Due to SNAPHOT version of the archetype, it gets deployed to the Snapshot Nexus repository as specified in the distributionManagement POM settings (the appropriate artefacts deployed to Nexus can be observed via the Nexus web interface and by manually checking files on server). However, running mvn archetype:generate -Dfilter=fielden: -DarchetypeCatalog=Snapshots reveals no artefacts to chose from.

Some additional information:

  • Maven version on both client and server is 2.2.1.
  • The POM of the archetype project contains a valid packaging value: <packaging>maven-archetype</packaging>.
  • The resultant jar has expected for Maven Archetype structure (i.e. directories archetype-resources and META-INF).
  • Nexus : Core Plugins : Maven Archetype Catalog is present in the Plugin Console with status Activated.
  • Here is a tail of the output of the mvn clean deploy command, which might be relevant:

    [INFO] [install:install {execution: default-install}]

    [INFO] Installing /home/oles/workspace-template/tg-app-archetype/target/tg-application-archetype-1.0-SNAPSHOT.jar to /home/oles/.m2/repository/fielden/tg-application-archetype/1.0-SNAPSHOT/tg-application-archetype-1.0-SNAPSHOT.jar

    [INFO] [archetype:update-local-catalog {execution: default-update-local-catalog}]

    [INFO] [deploy:deploy {execution: default-deploy}]

    [INFO] Retrieving previous build number from Snapshots Uploading: http://server-name/nexus/content/repositories/snapshots/fielden/tg-application-archetype/1.0-SNAPSHOT/tg-application-archetype-1.0-20120117.140536-2.jar 1358K uploaded (tg-application-archetype-1.0-20120117.140536-2.jar)

    [INFO] Retrieving previous metadata from Snapshots

    [INFO] Uploading repository metadata for: 'artifact fielden:tg-application-archetype'

    [INFO] Uploading project information for tg-application-archetype 1.0-20120117.140536-2

    [INFO] Retrieving previous metadata from Snapshots

    [INFO] Uploading repository metadata for: 'snapshot fielden:tg-application-archetype:1.0-SNAPSHOT'

    [INFO] ------------------------------------------------------------------------

    [INFO] BUILD SUCCESSFUL

    [INFO] ------------------------------------------------------------------------

    [INFO] Total time: 11 seconds

    [INFO] Finished at: Tue Jan 17 16:05:39 EET 2012

    [INFO] Final Memory: 32M/294M

    [INFO] ------------------------------------------------------------------------

I have reviewed similar questions and searched for viable solutions at no avail. Would greatly appreciate any help that might help in resolving the above archetype deployment issue.

1

There are 1 answers

0
Mat On

Yeah that's a bit old, but may be related to a problem of mine :

Hope this help.