Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.9
-
Fix Version/s: 1.9
-
Labels:None
-
Environment:SVN revision 157841 for core and 157848 for plugin
-
Number of attachments :
Description
When upgrading Maven to 1.1 Snapshot, I encountered a malicious bug with integration tests.
Calling this goal works very well:
maven-1\plugins\trunk\xdoc>maven plugin:test
...
BUILD SUCCESSFUL
But this goal doesn't work:
maven-1\plugins\trunk\xdoc\src\plugin-test>maven testPlugin
...
BUILD FAILED
File...... \maven-1\plugins\trunk\xdoc\src\plugin-test\maven.xml
Element... maven:reactor
Line...... 20
Column.... 127
Unable to obtain goal [test-xdoc] – C:\Documents and Settings\Siveton
Vincent\.maven\cache\maven-xdoc-plugin-1.9-SNAPSHOT\plugin.jelly:502:13:
<velocity:merge>
Invocation of method 'getText' in class org.apache.velocity.anakia.Escape
threw exception class java.lang.NullPointerException : null
Total time: 24 seconds
Further investigation shows that a property (project.issueTrackingUrl) is not properly set when processing the xdoc template folder. It seems to be a problem of inheriting properties. See:
$escape.getText($project.issueTrackingUrl)) in the issue-tracking.xml file
Solutions proposal:
Adding this following line in each project.xml from plugin-test src:
<issueTrackingUrl>http://jira.codehaus.org/browse/MPXDOC</issueTrackingUrl>
A best way is to check directly the null property in the xdoc file. For instance, in the issue-tracking.xml file:
#if ($$project.issueTrackingUrl && $$project.issueTrackingUrl.length() != 0)
#set ($url = $escape.getText($repository.url))
...
#end
Moreover, in the same idea, I think another bug can be found in the code: cvs-usage.xml or cvs.xml file with the property $repository.url:
$escape.getText($repository.url)
Fixed. Thanks.