Author: dennisl Date: Thu Aug 14 19:30:35 2014 New Revision: 1618026 URL: http://svn.apache.org/r1618026 Log: [RAT-168] Add integration test for apache-rat:rat to catch NPE Use the correct annotation for this kind of @Parameter. The "property" option is used for parameters that can be set from the command line as a system property using -D, but this parameter is read only so we should not use that. Instead we want the parameter to have a default value injected with the current project. The IT (it4_RAT-168) that was added for this issue still passes with this change.
Modified: creadur/rat/trunk/apache-rat-plugin/src/main/java/org/apache/rat/mp/AbstractRatMojo.java Modified: creadur/rat/trunk/apache-rat-plugin/src/main/java/org/apache/rat/mp/AbstractRatMojo.java URL: http://svn.apache.org/viewvc/creadur/rat/trunk/apache-rat-plugin/src/main/java/org/apache/rat/mp/AbstractRatMojo.java?rev=1618026&r1=1618025&r2=1618026&view=diff ============================================================================== --- creadur/rat/trunk/apache-rat-plugin/src/main/java/org/apache/rat/mp/AbstractRatMojo.java (original) +++ creadur/rat/trunk/apache-rat-plugin/src/main/java/org/apache/rat/mp/AbstractRatMojo.java Thu Aug 14 19:30:35 2014 @@ -199,7 +199,7 @@ public abstract class AbstractRatMojo ex /** * Holds the maven-internal project to allow resolution of artifact properties during mojo runs. */ - @Parameter(property = "project", required = true, readonly = true) + @Parameter(defaultValue = "${project}", required = true, readonly = true) private MavenProject project; /**