Skip to main content

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

I mistakenly tried to raise a JIRA about this issue then got confused
why the Dev M2E OSS JIRA wouldn't let me raise an issue so mistakenly
added it to Maven IDE instead (figuring it could just be a rename or
something). Apologies!
https://issues.sonatype.org/browse/MAVENIDE-6
I figure its maybe best describing the scenario on the mailing list first...

We're trying to create an eclipse plugin so that all our FuseSource
archetypes just work inside m2eclipse. So by creating an eclipse
plugin and using the m2eclipse extension points we've been able to add
a new Archetype Catalog so that the FuseSource archetypes are listed
in the New Maven Project dialog out of the box. Yay! We hit this
issue:
https://issues.sonatype.org/browse/MNGECLIPSE-2757 so we had to use a
local archetype catalog XML file as a workaround until 0.13 is out.

So we now get the Fuse archetypes inside m2eclipse - they appear
nicely in the "New Maven Project" wizard; however when I try to create
one of the archetypes it finds that the archetype is not resolvable.
This is because the FuseSource archetypes don't get sync'd to central,
since we use different version numbers from the Apache releases - long
story - I know, with hindsight we'd have used a different groupId from
Apache so we could have sync'd them.

So our archetypes are here:
http://repo.fusesource.com/nexus/content/groups/public/

I tried adding an "Index" extension point to add this remote repo
(tried short as true or false), but still it doesn't find the
archetype when trying to execute it.

I wonder, other than telling the user "please hack your
~/.m2/settings.xml file to create a profile, activate it by default
and shove in a <repository> section" which seems a bit hacky - is
there any way of registering an archetype repository somewhere, so by
adding our Eclipse plugin, our archetypes just work in m2eclipse
without the end user having to do anything magical or hacky?

I did wonder about hacking it in our plugin and getting the
MavenPlugin object itself and getting the RepositoryRegistry from
there and hacking it in somehow but that feels dirty. I wonder if
there's a clean way? I could in our plugin use Aether to download all
our archetypes locally just in case; but again that feels like a dirty
hack.

I totally grok that archetypes should be sync'd with central -
eventually I hope we can do that - but I wondered if there's anything
tactical we can do in the meantime?

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

Open Source Integration


Back to the top