You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Rohnny Moland <rm...@gmail.com> on 2008/02/04 10:37:22 UTC

ignoring test dependencies when you run maven with maven.test.skip=true

Hello,

I was reading this:

<http://maven.apache.org/guides/mini/guide-attached-tests.html>.

It works fine if I build my project and run the tests, but what if I
want to just build my project and skip the tests? I get a dependency
resolution error then, because my test dependency cannot be found.

I know 2 possible solutions:
1) Create a profile and include my test dependency in it. This is
misuse of a profile in my opinion.
2) Deploy the test dependency in a local repository and only depend on
it as a binary.

I dont really understand why the reactor does not ignore dependencies
with scope=test, when you run maven with the skip test option set to
true. Isnt this how it should be?


Regards,
Rohnny.

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


Re: ignoring test dependencies when you run maven with maven.test.skip=true

Posted by nicolas de loof <ni...@apache.org>.
Build your project with maven.test.skip.exec=true

This will build the required test-jar dependencies but skip test execution.

2008/2/4, Rohnny Moland <rm...@gmail.com>:
>
> Hello,
>
> I was reading this:
>
> <http://maven.apache.org/guides/mini/guide-attached-tests.html>.
>
> It works fine if I build my project and run the tests, but what if I
> want to just build my project and skip the tests? I get a dependency
> resolution error then, because my test dependency cannot be found.
>
> I know 2 possible solutions:
> 1) Create a profile and include my test dependency in it. This is
> misuse of a profile in my opinion.
> 2) Deploy the test dependency in a local repository and only depend on
> it as a binary.
>
> I dont really understand why the reactor does not ignore dependencies
> with scope=test, when you run maven with the skip test option set to
> true. Isnt this how it should be?
>
>
> Regards,
> Rohnny.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>