You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Phil Housley <un...@gmail.com> on 2010/02/09 15:54:04 UTC

Aggregating secondary artifacts

Rather than trying to explain abstractly, here's a brief description
of what I'm working on:

I need to make a bundle out of some number of (independently) maven
managed components, in something like the same way as building a war,
but with a custom format.  For this, I've made my own packaging
plugin, which reads through dependencies and wraps them up as
required.  The next part of the issue is that any of these components
might have a secondary artifact, which should also be collected up.
The other artifact is basically just a bundle of text, and has a
specific classifier.

Does this sound possible?  I'm concerned that it might not be, because
with no explicit dependency, there doesn't seem to be a good way to
get hold of an artifact, even if you know where it should be.

As a workaround, I've considered embedding the secondary artifacts
into the main ones, and then just burrowing through the jars and
seeing what I find, which seems to work, but is logically a bit of a
mess.

Unfortunately, it then gets more complicated.  We also allow wars to
be included in a bundle, and there is no dependency information to be
had at all about what is in the war, so even if I dig into the war's
libraries, I can't find out which jars depend on which others.

Am I just trying to do something that Maven wasn't intended for?  If
so, there might be some way I can use another pom, and depend on the
secondary artifacts directly, but that has a lot of scope for people
to make mistakes in the future, as dependencies are all listed twice
in different places, so I'd like to avoid it.

Any thoughts would be appreciated.

Thanks.

Oh, and one more question, is there anywhere some better documentation
for writing plugins that at maven.apache.org?  I find it hard to
believe that all the plugin devs can work with almost no comments on
the APIs...

-- 
Phil Housley

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org