Today I worked on an IDE feature which enumerates archetypes available in your local repository that you might want to instantiate projects from, so you can pick from a
list, and ran into a problem which I'm not sure I have solved satisfactorily.
If the archetype used <packaging>maven-archetype</packaging> then the install phase seems to insert an entry in archetype-catalog.xml, which makes it easy to find in the
local repo. Archetypes from a remote repo are also easy to find because the Nexus indexer records the packaging for every artifact, so you can do a Lucene search on it.
And archetype:create-from-project sets up this packaging - fine.
But it seems that most real archetypes just use jar packaging - not just those in mojo-archetypes, but even the official list like Quick Start. To find these in the local
repository you need to add a custom index field looking for archetype-metadata.xml in the JAR artifact, and there is no clear way to find them in a remote repository.
So should the mojo-archetypes be converted to use maven-archetype packaging, or
are they fine as they are?
Another curious thing: though the mojo-archetypes appear to have always used jar packaging, and e.g. webapp-javaee6 in Central lists the packaging as jar when you
download the POM for 1.0, 1.0.1, 1.0.2, and 1.1, the Central index lists the packaging as maven-archetype for 1.0, 1.0.1, and 1.0.2 - but not 1.1. Anyone know what is
going on with that?
Reference: https://netbeans.org/bugzilla/show_bug.cgi?id=190401
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email