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