jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Maven 1.x XDoc Plugin
  • MPXDOC-179

Can't use relative links for external entities

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.9, 1.9.1, 1.9.2, 1.10
  • Fix Version/s: None
  • Labels:
    None
  • Environment:
    maven-1.1 beta 3 from SVN

Description

Actually we can't use a relative path in xdocs to declare external entities
For exemple in plugins\trunk\xdoc\xdocs\reference\xdocs.xml we reference escapeXml.xml like this with an absolute path from where maven is generally called (in the xdoc plugin root directory)
<!DOCTYPE document [
<!ENTITY escapeXmlExample SYSTEM "file:xdocs/reference/escapeXml.xml">
]>
Thus if we use a multiproject the site fails. For example :
plugins\trunk>maven -Dgoal=site -Dmaven.multiproject.includes=xdoc/project.xml multiproject:goal
gives :
LA CONSTRUCTION A ╚CHOU╚
Fichier... D:\Data\maven-1\cache\maven-multiproject-plugin-1.5-SNAPSHOT\plugin.jelly
╚lement... maven:reactor
Ligne..... 226
Colonne... -1
Unable to obtain goal [site] – D:\Data\maven-1\cache\maven-xdoc-plugin-1.10-SNAPSHOT\plugin.jelly:490:-1: <x:parse> xdocs\reference\escapeX
ml.xml (The system cannot find the path specified) Nested exception: xdocs\reference\escapeXml.xml (The system cannot find the path specifie
d)

If I use a relative path :
<!DOCTYPE document [
<!ENTITY escapeXmlExample SYSTEM "file:escapeXml.xml">
]>
With the same command as previously I receive a similar error :
Fichier... D:\Data\maven-1\cache\maven-multiproject-plugin-1.5-SNAPSHOT\plugin.jelly
╚lement... maven:reactor
Ligne..... 226
Colonne... -1
Unable to obtain goal [site] – D:\Data\maven-1\cache\maven-xdoc-plugin-1.10-SNAPSHOT\plugin.jelly:490:-1: <x:parse> Error on line 3 of docu
ment : URI relative "file:escapeXml.xml"; ne peut Űtre rÚsolue sans URI de base. Nested exception: URI relative "file:escapeXml.xml"; ne pe
ut Űtre rÚsolue sans URI de base.

It seems to be a problem with dom4j 1.4

Issue Links

depends upon

Task - A task that needs to be done. MAVEN-1345 Upgrade dom4j

  • Blocker - Blocks development and/or testing work, production could not run
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.
is duplicated by

Bug - A problem which impairs or prevents the functions of the product. MPXDOC-188 relative references from xdocs/*.xml resolve incorrectly

  • Major - Major loss of function.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.
supercedes

Bug - A problem which impairs or prevents the functions of the product. MPXDOC-38 Relative XML entities broken in xdoc

  • Major - Major loss of function.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Lukas Theussl added a comment - 16/Jan/06 12:44 PM

See also MPXDOC-188

Show
Lukas Theussl added a comment - 16/Jan/06 12:44 PM See also MPXDOC-188
Hide
Permalink
Lukas Theussl added a comment - 02/May/06 6:57 PM

Confirming that this works with my upgraded dom4j build, see the recent comments at MAVEN-1345. So the problem is not in the xdoc plugin but in the core.

Show
Lukas Theussl added a comment - 02/May/06 6:57 PM Confirming that this works with my upgraded dom4j build, see the recent comments at MAVEN-1345. So the problem is not in the xdoc plugin but in the core.
Hide
Permalink
Arnaud Heritier added a comment - 04/May/06 4:58 AM

(for the users) ... because the core overrides the dependencies in the plugins with the ones it uses itself. It's the case for dom4J, thus we need to upgrade the dom4j used in the core to fix this problem (or we modify the classloader mechanism - which was done in m2).

Show
Arnaud Heritier added a comment - 04/May/06 4:58 AM (for the users) ... because the core overrides the dependencies in the plugins with the ones it uses itself. It's the case for dom4J, thus we need to upgrade the dom4j used in the core to fix this problem (or we modify the classloader mechanism - which was done in m2).
Hide
Permalink
Paul Libbrecht added a comment - 20/Jun/06 3:04 AM

It surprises me to be considered closed.

I could drill this down to the issue
https://sourceforge.net/tracker/?func=detail&atid=116035&aid=681658&group_id=16035
of dom4j.
a fix for which was made in 2003 and stipulates that when a java.io.File object is passed to SAXReader.read() an input-stream is passed... hence no relative resolution can be done.

This affects jelly's x:parse tag as well.
The current "escape" is that when you know you have a file (and it does not contain a "#" sign!) you call it's toURL() method.
(in turn this is a bug in java's File.toURL() which should convert a # sign in the toURL method).

paul

Show
Paul Libbrecht added a comment - 20/Jun/06 3:04 AM It surprises me to be considered closed. I could drill this down to the issue https://sourceforge.net/tracker/?func=detail&atid=116035&aid=681658&group_id=16035 of dom4j. a fix for which was made in 2003 and stipulates that when a java.io.File object is passed to SAXReader.read() an input-stream is passed... hence no relative resolution can be done. This affects jelly's x:parse tag as well. The current "escape" is that when you know you have a file (and it does not contain a "#" sign!) you call it's toURL() method. (in turn this is a bug in java's File.toURL() which should convert a # sign in the toURL method). paul
Hide
Permalink
Lukas Theussl added a comment - 20/Jun/06 11:47 AM

It is not closed, at least not until we manage to upgrade dom4j. I only verified that in some cases, relative entity resolution works with the latest dom4j, where it fails with the dom4j currently included in m1 (v1.4). That's probably because I didn't use any excluded URL characters in my tests. Did you read Kohsuke's comment at MPXDOC-188? For the File.toURL() bug, see http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4273532 .

Show
Lukas Theussl added a comment - 20/Jun/06 11:47 AM It is not closed, at least not until we manage to upgrade dom4j. I only verified that in some cases, relative entity resolution works with the latest dom4j, where it fails with the dom4j currently included in m1 (v1.4). That's probably because I didn't use any excluded URL characters in my tests. Did you read Kohsuke's comment at MPXDOC-188? For the File.toURL() bug, see http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4273532 .
Hide
Permalink
Lukas Theussl added a comment - 20/Jul/06 1:44 PM

Fixed with MAVEN-1345 (ie Maven-1.1-beta-3).

Show
Lukas Theussl added a comment - 20/Jul/06 1:44 PM Fixed with MAVEN-1345 (ie Maven-1.1-beta-3).

People

  • Assignee:
    Unassigned
    Reporter:
    Arnaud Heritier
Vote (0)
Watch (1)

Dates

  • Created:
    14/Oct/05 9:34 AM
    Updated:
    20/Jul/06 1:44 PM
    Resolved:
    20/Jul/06 1:44 PM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.