Issue Details (XML | Word | Printable)

Key: MPDASHBOARD-34
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Arnaud Heritier
Reporter: pkernevez
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Maven 1.x Dashboard Plugin

Cobertura aggregator don't support offline mode

Created: 30/Nov/05 02:44 PM   Updated: 02/Dec/05 04:51 AM   Resolved: 02/Dec/05 04:51 AM
Return to search
Component/s: None
Affects Version/s: 1.9
Fix Version/s: 1.9

Time Tracking:
Not Specified

File Attachments: 1. Text File MPDASHBOARD-34.patch (2 kB)



 Description  « Hide

We I throw the goal "dashboard:report-single" I had an error if I am off line:
BUILD FAILED
File...... C:\maven\home\.maven\cache\maven-dashboard-plugin-1.9-SNAPSHOT\plugin.jelly
Element... j:import
Line...... 210
Column.... -1
file:/C:/maven/home/.maven/cache/maven-dashboard-plugin-1.9-SNAPSHOT/plugin-resources/aggregators/coberturaloc.jelly:32:
-1: <x:parse> Error on line 2 of document : External entity not found: "http://cobertura.sourceforge.net/xml/coverage-0
2.dtd". Nested exception: External entity not found: "http://cobertura.sourceforge.net/xml/coverage-02.dtd".
Total time : 2 seconds
Finished at : Wednesday, November 30, 2005 6:25:22 PM CET

This error is due to the DTD declaration into the file "target\docs\cobertura\coverage.xml":
<!DOCTYPE coverage SYSTEM "http://cobertura.sourceforge.net/xml/coverage-02.dtd">

If your remove this declaration the target dashboard:report-single succed in.
This is because the plugin need to be on line to be able to download the dtd.

I tried to change the aggretors' jelly script but the jelly attribute "validate" doesn't seems to perform:
I replace the part:
<j:when test="${artifactAsFile.exists()}">
<x:parse var="doc" xml="${artifactAsFile}"/>
<x:expr select="count($doc/coverage/packages/package/classes/class/lines/line[@number>0])"/>
</j:when>

with :
<j:when test="${artifactAsFile.exists()}">
<x:parse var="doc" xml="${artifactAsFile}" validate="false"/>
<x:expr select="count($doc/coverage/packages/package/classes/class/lines/line[@number>0])"/>
</j:when>

But I don't resolve my issue



pkernevez added a comment - 30/Nov/05 03:25 PM

I'm not really off line but the http proxy (with login) properties are not used by the jelly tag "xml:parse"


pkernevez added a comment - 01/Dec/05 04:25 PM

Add a patch. It consiste a the deletion of the DTD declaration before the parsing of the Xml file.


pkernevez added a comment - 01/Dec/05 04:44 PM

Arnaud Heritier added a comment - 01/Dec/05 05:09 PM

your patch will make the plugin compatible only with maven 1.1
the jelly tag util:replace bundled in maven 1.0.2 doesn't allow to replace a String.
Personnaly I'm not against to create plugins compatible only with maven 1.1 if we don't have a workaround.


Arnaud Heritier added a comment - 02/Dec/05 04:51 AM

The workaround is applied.
You can download the SNAPSHOT with :

maven plugin:download -DartifactId=maven-dashboard-plugin -DgroupId=maven -Dversion=1.9-SNAPSHOT -Dmaven.repo.remote=http://cvs.apache.org/repository

This bug will be reopen when http://issues.apache.org/jira/browse/JELLY-224 will be fixed and integrated in maven.