2012/5/13 Hervé BOUTEMY <[email protected]>:
> Le dimanche 13 mai 2012 14:39:29 Olivier Lamy a écrit :
>> 2012/5/12  <[email protected]>:
>> > Author: hboutemy
>> > Date: Sat May 12 16:14:40 2012
>> > New Revision: 1337586
>> >
>> > URL: http://svn.apache.org/viewvc?rev=1337586&view=rev
>> > Log:
>> > added DependencyScope enumeration
>> >
>> > +public enum DependencyScope
>> > +{
>> > +    COMPILE( Artifact.SCOPE_COMPILE ),
>> > +    COMPILE_PLUS_RUNTIME( Artifact.SCOPE_COMPILE_PLUS_RUNTIME ),
>>
>> with maven 2 ?
> yes, no problem
> notice I ha to override dependency to maven-artifact 3.0 to make the code
> compile
> then it works a like a charm at runtime too, since constants are inlined in
> the class, so the compile-time dependency isn't visible

No it's the problem :-)

I mean someone use
@Mojo( .. requiresDependencyResolution =
DependencyScope.COMPILE_PLUS_RUNTIME ... )
and a field
@Parameter( defaultValue = "${project.artifacts}", required = true,
readonly = true )
private Set<Artifact> dependencies;

dependencies will be null when running this mojo with m2 whereas not with m3.


>
> Regards,
>
> Hervé
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>



-- 
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]

Reply via email to