You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by "Arnaud HERITIER (JIRA)" <ji...@codehaus.org> on 2005/05/30 13:37:22 UTC

[jira] Updated: (MPXDOC-136) Integration tests bug (NullPointerException)

     [ http://jira.codehaus.org/browse/MPXDOC-136?page=all ]

Arnaud HERITIER updated MPXDOC-136:
-----------------------------------

    Attachment: MPXDOC-136-cvs-usage.xml.diff

test if repository.url exists before to use it

> 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
>     Assignee: Arnaud HERITIER
>      Fix For: 1.9
>  Attachments: MPXDOC-136-cvs-usage.xml.diff
>
>
> 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
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org