Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [m2e-dev] using archetypes which are not in the central repo from inside m2e?

On 28 January 2011 13:04, Fred Bricon <fbricon@xxxxxxxxx> wrote:
> James,
>
> have you tried adding the repo url for each artifact in your custom xml
> catalog? See [4] in the archetype catalog description
> http://maven.apache.org/archetype/maven-archetype-plugin/specification/archetype-catalog.html

Awesome idea, huge thanks! I didn't realise we could add that in there :)

The docs do say "The repository where to find the archetype. OPTIONAL.
When ommitted, the archetype is searched for in the repository where
the catalog comes from." - and in this case the artifacts are in the
same repo that the archetype-catalog.xml file comes from.

I tried adding it anyway:
http://maven.apache.org/archetype/maven-archetype-plugin/specification/archetype-catalog.html

and no joy.

It turns out on further investigation that due to the missing Wagon
dependency in 0.12.1.x,
https://issues.sonatype.org/browse/MNGECLIPSE-2757

that m2eclipse can't use local or remote artefact catalogs anyway. I
stupidly thought my local archetype catalog was being used; but not,
its the Nexus Indexer thats finding the archetypes - using the new
index I added with the m2eclipse "org.maven.ide.eclipse.indexes"
extension point.

I'm wondering whether or not the Nexus Indexer discovery mechanism
even looks at the archetype-catalog.xml? Or maybe its that m2ecilpse
needs to be fixed to respect either the repository of the Nexus
Indexer or where the archetype catalog comes from, or the <repository>
in the <archetype> element?

When looking in the Maven Repositories view when running the plugin, I
see in the "Custom Repositories" folder, the repository used to find
the archetype catalogs; so it seems m2eclipse is using this custom
repo/index when finding the archetypes and it seems to think its a
"Custom Repository" in the "Maven Repositories" view, but not using it
when trying to instantiate the archetype.

I guess once 0.13 is out, we can go back to using Archetype Catalogs
again and the local or remote might work. Anyone else got any other
ideas?

-- 
James
-------
FuseSource
Email: james@xxxxxxxxxxxxxx
Web: http://fusesource.com
Twitter: jstrachan
Blog: http://macstrac.blogspot.com/

Open Source Integration


Back to the top