5
votes

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
If you run mvn generate:archetype without the filter, does your archetype show up in the long list?Michael
Yes it does -- indicated as local.01es
Same problem here, but no solution yet... Have you found something?Sébastien
@Séb Unfortunately no -- have tried many different things (except reinstalling Nexus) at no avail. Planning migration to a new server and hoping that things would work there (:01es
Can you try this with the latest Nexus release and let me know if it still not working. From what I remember there were a few issues with Maven versions as well. Make sure you use 3.0.4+ and new versions of the deploy plugin.Manfred Moser

1 Answers

0
votes

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

Hope this help.