Integration tests bug (NullPointerException)
--------------------------------------------
Key: MPXDOC-136
URL: http://jira.codehaus.org/browse/MPXDOC-136
Project: maven-xdoc-plugin
Type: Bug
Versions: 1.9
Environment: SVN revision 157841 for core and 157848 for plugin
Reporter: Siveton Vincent
Assigned to: Arnaud HERITIER
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)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]