You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Stefano Bagnara <ap...@bago.org> on 2008/08/01 13:44:23 UTC

type=test-jar vs classifier=tests

I have a multimodule project where some module tests have dependencies 
on other modules tests.

I can use both
<classifier>tests</classifier>
<scope>test</scope>
and
<type>test-jar</type>
<scope>test</scope>

I think I notice that the type "test-jar" works when I build it in 
reactor without installing while the classifier does not work in that 
case if I don't add "install" as one of my goals.

Is there any other change in this? Why isn't the <classifier> method 
working in reactor?

I see here http://maven.apache.org/guides/mini/guide-attached-tests.html
you suggest the classifier method, but I think in past I always read 
about the type test-jar method....

Stefano

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


Re: type=test-jar vs classifier=tests

Posted by Brett Porter <br...@gmail.com>.
I think the test-jar type is "more correct". The ambiguity is confusing
though and I think there should be no reason why both shouldn't work in the
reactor.
- Brett

2008/9/12 Barrie Treloar <ba...@gmail.com>

> On Fri, Aug 1, 2008 at 9:14 PM, Stefano Bagnara <ap...@bago.org> wrote:
> > I have a multimodule project where some module tests have dependencies on
> > other modules tests.
> >
> > I can use both
> > <classifier>tests</classifier>
> > <scope>test</scope>
> > and
> > <type>test-jar</type>
> > <scope>test</scope>
> >
> > I think I notice that the type "test-jar" works when I build it in
> reactor
> > without installing while the classifier does not work in that case if I
> > don't add "install" as one of my goals.
> >
> > Is there any other change in this? Why isn't the <classifier> method
> working
> > in reactor?
> >
> > I see here http://maven.apache.org/guides/mini/guide-attached-tests.html
> > you suggest the classifier method, but I think in past I always read
> about
> > the type test-jar method....
>
> Has anyone got advice on this?
>
> I had a similar problem, where I was using classifier as per the guide
> but maven-eclipse-plugin then includes the project twice.
> But if I change to <type>test-jar</type> everything works.
>
> Which one is the correct way?
> Should the guide be updated?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


-- 
Brett Porter
Blog: http://blogs.exist.com/bporter/

Re: type=test-jar vs classifier=tests

Posted by Barrie Treloar <ba...@gmail.com>.
On Fri, Aug 1, 2008 at 9:14 PM, Stefano Bagnara <ap...@bago.org> wrote:
> I have a multimodule project where some module tests have dependencies on
> other modules tests.
>
> I can use both
> <classifier>tests</classifier>
> <scope>test</scope>
> and
> <type>test-jar</type>
> <scope>test</scope>
>
> I think I notice that the type "test-jar" works when I build it in reactor
> without installing while the classifier does not work in that case if I
> don't add "install" as one of my goals.
>
> Is there any other change in this? Why isn't the <classifier> method working
> in reactor?
>
> I see here http://maven.apache.org/guides/mini/guide-attached-tests.html
> you suggest the classifier method, but I think in past I always read about
> the type test-jar method....

Has anyone got advice on this?

I had a similar problem, where I was using classifier as per the guide
but maven-eclipse-plugin then includes the project twice.
But if I change to <type>test-jar</type> everything works.

Which one is the correct way?
Should the guide be updated?

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