Thank you so very much for the reply Justin.

I'll go ahead and provide an implementation stub in the project tab to a class 
that extends "MavenProjectStub"; following your example for Hudson.  This setup 
is just for the AbstractMojoTestCase, right?  Presumably, normal poms don't 
need this stub for the plugin to function, I hope.

Do you know of anymore documentation around that project?  For example, my 
jUnit tests are runnable, but do not execute as part of the build cycle, which 
I'd love to know how to fix.

best wishes,

Andrew

On Oct 28, 2010, at 10:58 AM, Justin Edelson wrote:

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


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to