Please see my inline comments below...

Jochen Wiedmann wrote:
Hi,

I am currently trying to use the maven-plugin-testing-harness for
testing a report plugin. Two questions came up so far:

1.) When I run the test, I receive the following exception:

       java.lang.NullPointerException">java.lang.NullPointerException
at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(De
faultArtifactResolver.java:100)
at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(De
faultArtifactResolver.java:63)
at org.codehaus.mojo.rat.RatReportMojo.getSkinArtifactFile(RatReportMojo
.java:124)
at org.codehaus.mojo.rat.RatReportMojo.execute(RatReportMojo.java:209) at org.codehaus.mojo.rat.RatCheckMojoTest.testIt3(RatCheckMojoTest.java:
178)

The exception is caused by the fact, that I need to provide a parameter

       /**
        * @parameter default-value="${localRepository}"
        * @required
        * @readonly
        */
       private ArtifactRepository localRepository;

   How do I creare this parameter? I suppose, it's an instance of
DefaultArtifactRepository,
   but how do I configure it?
I'm pretty sure the testing harness can take care of expressions ${localRepository}... it may be because you put it in "default-value" instead of "expression".

2.) My test POM currently contains the following section:

       <build>
         <plugins>
           <plugin>
             <groupId>org.codehaus.mojo</groupId>
             <artifactId>rat-maven-plugin</artifactId>
             <version>0.1-SNAPSHOT</version>
             <configuration/>
           </plugin>
         </plugins>
       </build>
       <reporting>
         <plugins>
           <plugin>
             <groupId>org.codehaus.mojo</groupId>
             <artifactId>rat-maven-plugin</artifactId>
             <version>0.1-SNAPSHOT</version>
             <configuration/>
           </plugin>
         </plugins>
       </reporting>

It seems, that the build section is required, although I would want to use the reporting section only, as in the actual POM which uses my report. Is that
 possible?

This is a bug... Please file this in jira and we'll have a look at it. Thanks.

Thanks,

Jochen



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to