I would say that most of the time when you start thinking about using
classifiers, you should think again. The Javadoc and sources cases are good
examples of when classifiers are the way to go, but I've seen some very ugly
cases where people try to go about the original issue with bad Maven design
by using classifiers. One Maven project has one primary artifact. Just one.
If you're trying to get two (primary) artifacts out of your project you're
doing things wrong. The primary reason is, as you've stated, that there is
only one pom and therefore only one set of dependencies. The jdk14 and jdk15
case is, IMO, not a good example of when to use classifiers, as they could
have different dependencies. The dependency management of Maven is one of
the benefits of using Maven, don't break that!

I believe you're with me on this but I wanted to firmly state this as there
are some very bad examples of classifiers usage. Have a look at this and
weep:
http://repository.jboss.org/maven2/org/jboss/jbossas/jboss-as-varia/5.1.0.GA/

/Anders

On Mon, Oct 19, 2009 at 21:12, Quintin Beukes <[email protected]> wrote:

> The examples are perfect. Thanks.
>
>
> > I think Todd answered your second question already. One gotcha - there's
> > only one pom, so you can't have different dependencies per classified
> > artifact. This can be worked around with excludes in the downstream
> > project, but if you run into this repeatedly, it suggests that you
> > really need two projects, not two artifacts from the same project
> > differentiated by classifier.
> >
>
> Yeah, though doing this is pretty specialized, so I guess if you need
> different dependencies you most likely need to rethink if your
> building in the most correct way.
>
> Q
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to