I'd move the 'special' tests to their own project.

On Tue, Jan 17, 2012 at 11:17 AM, Stevo Slavić <[email protected]> wrote:
> OK, thanks for explaining! A module's tests are supposed to be run only by
> part of the team. For others not even test dependencies are accessible, so
> just disabling compiling and executing tests was not enough. Resolved this
> with a profile and putting dependencies of those tests there.
>
> Kind regards,
> Stevo.
>
> On Tue, Jan 17, 2012 at 5:06 PM, Olivier Lamy <[email protected]> wrote:
>
>> Hello,
>>
>> 2012/1/17 Stevo Slavić <[email protected]>:
>> > Hello Maven community,
>> >
>> > Why does Maven (3.0.3) resolve test scoped dependencies when tests
>> > compilation and execution is skipped via maven.test.skip system property?
>>
>> That's something will happen with all maven 2.x or 3.x versions.
>> Why because maven use something generic which is kind of plugin
>> "metadata" which contains the dependencies "level/scope" needed.
>> So at this stage when resolving dependencies for the plugin, maven
>> core doesn't have any idea on any skip or other plugin parameters or
>> what the plugin does.
>>
>> How does it work.
>> See source
>> http://svn.apache.org/repos/asf/maven/surefire/trunk/maven-surefire-plugin/src/main/java/org/apache/maven/plugin/surefire/SurefirePlugin.java
>>
>> You will see an annotation @requiresDependencyResolution test (this
>> the "metadata).
>> So maven core only knows he need to resolve dependencies even if the
>> mojo have a skip or a shutdownMachine :-) parameter
>>
>> >
>> > I'm trying to achieve this by defining a profile with all test scope
>> > dependencies declared in it only. Profile is activated when
>> maven.test.skip
>> > system property is not defined. Would be more precise if I could specify
>> > activation to be when that property is not defined or is set to false but
>> > that doesn't seem to be possible (no compound expressions in single
>> > property, no multiple properties in single activation) or am I missing
>> > something?
>> >
>> > Kind regards,
>> > Stevo.
>>
>>
>>
>> --
>> Olivier Lamy
>> Talend: http://coders.talend.com
>> http://twitter.com/olamy | http://linkedin.com/in/olamy
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to