fmeili wrote:
My plugin needs all dependend artifacts (includeing transitives) of the project. With maven 2.2.1 the call to project.getArtifacts() works correct. When using it with maven 3.0.1 the returned set of artifacts for a project has a size of zero.Code snippets: /** * @goal myGoal * @phase package * @inheritByDefault false * @threadSafe */ public class MyEar extends AbstractMojo { ... /** * @parameter default-value="${project}" * @required * @readonly */ protected MavenProject project; ... Set artifacts = project.getArtifacts(); // set is empty in maven 3 but ok in maven 2 I played with the javadoc class annotation "@requiresDependencyResolution
You need this annotation, whether you request compile, runtime or test classpath is a choice you need to make.
Plugins accessing dependencies without this annotation produce random results in Maven 2 depending on which plugins ran before.
Benjamin --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
