You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by bo...@werken.com on 2002/12/01 23:36:32 UTC

[maven-bug] New comment: (MAVEN-166) Maven fails on j2sdk1.4.1_01 because of Xerces

The following comment has been added to this issue:

     Author: Aslak Hellesøy
    Created: Sun, 1 Dec 2002 4:36 PM
       Body:
A better fix for this problem could be to check for java.version in org.apache.maven.cli.App (or maybe some other class) and set the XML related system properties to Xerces if version < 1.4.
---------------------------------------------------------------------
View the issue:

  http://jira.werken.com/secure/ViewIssue.jspa?key=MAVEN-166


Here is an overview of the issue:
---------------------------------------------------------------------
        Key: MAVEN-166
    Summary: Maven fails on j2sdk1.4.1_01 because of Xerces
       Type: Improvement

     Status: Assigned
   Priority: Major

 Time Spent: Unknown
   Estimate: 0 minutes

    Project: maven
  Component: None
   Versions:
             1.0-beta-8

   Assignee: Jason van Zyl
   Reporter: Aslak Hellesøy

    Created: Sun, 1 Dec 2002 3:11 PM
    Updated: Sun, 1 Dec 2002 3:11 PM
Environment: j2sdk1.4.1_01, win2k, maven cvs head on 2002.12.01 20:00 GMT, cygwin/bash and dos/command.

Description:
The current maven and maven.bat scripts tell the VM to use Xerces as XML parser. On j2sdk1.4.1_01 this will result in the following error during the xdoc:transform-user-docs goal:

Warning: Caught exception attempting to use SAX to load a SAX XMLReader
Warning: Exception was: java.lang.ClassNotFoundException: org/apache/xerces/parsers/SAXParser
Warning: I will print the stack trace then carry on using the default SAX parser
[ERROR] java.lang.ClassNotFoundException: org/apache/xerces/parsers/SAXParser
[ERROR]         at org.xml.sax.helpers.XMLReaderFactory.createXMLReader(XMLReaderFactory.java:121)
[ERROR]         at org.xml.sax.helpers.XMLReaderFactory.createXMLReader(XMLReaderFactory.java:96)
[ERROR]         at org.dom4j.io.SAXHelper.createXMLReader(SAXHelper.java:74)
[ERROR]         at org.dom4j.io.SAXReader.createXMLReader(SAXReader.java:615)
[ERROR]         at org.dom4j.io.SAXReader.getXMLReader(SAXReader.java:498)
[ERROR]         at org.dom4j.io.SAXReader.read(SAXReader.java:294)
[ERROR]         at org.dom4j.io.SAXReader.read(SAXReader.java:256)
[ERROR]         at org.apache.tools.dvsl.Transformer.transform(Transformer.java:163)
[ERROR]         at org.apache.tools.dvsl.DVSL.xform(DVSL.java:531)
[ERROR]         at org.apache.tools.dvsl.DVSL.transform(DVSL.java:551)
[ERROR]         at org.apache.maven.DVSLBean.transform(DVSLBean.java:787)

This patch adds the functionality to discover the jdk version. This is done by looking for the directory %JAVA_HOME%\jre\bin\client which only exists (I think) on j2sdk1.4.1. If the directory exists, the XML/Xerces related parameters are not passed to the VM.

Tested on both cygwin and command.


---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://jira.werken.com/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira