forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rick Tessner <>
Subject Re: Validation error with Crimson (WAS: Re: Plugin release process)
Date Thu, 02 Dec 2004 20:48:10 GMT
Rick Tessner wrote:

> It's definitely a classpath issue.  Now, the interesting thing is if I 
> explicity set the CLASSPATH environment variable to contain all the jars 
> in $FORREST_HOME/lib/*/*.jar and then run the "ant test" it works just 
> fine (well, except for a character encoding problem but that's a 
> different unrelated problem).
> I then unset the classpath and run the "ant test" and it fails as expected.
> Okay, so definitely classpath.
> Edit the main/targets/validate.xml and add the classpathref attribute to 
> the <xmlvalidate> task.  Give it a value of "forrest.cp" which is <path>

> set up in the <-prepare-classpath> task in main/ (it is 
> this build file that is referenced by the plugins/build.xml).
> Run the "ant test" again.  Fails with the same problem.
> Okay, try explicitly setting the <classpath> element as a child of 
> <xmlvalidate>.
> Run the "ant test" again.  Fails again, same problem.

Looks like the piece I was missing what that the <xmlvalidate> task not 
only required the classpathref (or classpath) attribute but also the 
classname attribute to define explicitly which class to use for the 
parser.  (Found by walking through the ant source ...)

So, on the <xmlvalidate> task, I set the classpathref="forrest.cp" and 
classname="org.apache.xerces.parsers.SAXParser" and ta da, it works.

Patch has been committed.

It looks like Ant determines on startup what XML parser it has and the 
<xmlvalidate> task will use that regardless of what it's told in terms 
of the classpath.  Hence, the necessity of explicitly telling it the 
classname as well.

Don't know why this would have been working under WinXP w/ cygwin for 
Ross tho ... :confused:

Rick Tessner
rick at apache dot org

View raw message