IIRC, you need to declare the project field and provide an implementation class.
See, for example, http://github.com/justinedelson/maven-hudson-plugin/blob/master/src/test/resources/unit/pom-with-local-ci.xml That code worked at some point... HTH, Justin On Oct 28, 2010, at 11:19 AM, Andrew Waterman wrote: > I'm not sure if this is the right forum for this, but I thought I would try > here first. > > I have a plugin that I am trying to develop that wants to resolve a set of > groupId/artifactId pairs to resolved artifacts in the MavenProject it is > executing from. I have annotated the dependent field in the following way: > > /* > @required > @parameter default-value="${project}" > */ > public MavenProject project; > > When I try and run my unit test (extending from the "AbstractMojoTestCase") I > get a NPE when I try and access the "project" class variable. When I look at > this in the debugger, I can see that the project field was never set; > although all other custom fields that have been set in the test pom are > showing up correctly. > > Any ideas? > > I'm also seeing this issue when I attempt to use the "@component" tag. > > Thanks! > > best wishes, > > Andrew --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org