You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by "Kerry, Richard" <ri...@atos.net> on 2013/09/13 18:08:08 UTC

RE: Use of XML Catalog with Ant (xslt task) - request for example


Ok, right, good, back on this again for a while after a break .....



My preference is to do the job entirely within the Ant file, so using <classpath> or <classpathref>.

I won't use -cp, as advised here.

I don't want to have to do any special copying after unpacking so I'd rather not copy jars into $ANT_HOME/lib if I don't need to.



"ant-resolver.jar and xml-resolver.jar "

hang on a moment .............  what are these ?

I thought I just needed resolver.jar from xml-commons-resolver-1.2 (assuming that's the latest), so what are these two ?



And (previous response) I don't touch ant-apache-resolver.jar, which is already under ant/lib, as it's an internal library







Now, back to catalog-specific issues.

There are three components to resolving urls using a catalog that I haven't seen explained clearly yet for Ant.

1.  The resolver.  The discussion above is about this.  I hope I'm getting closer to getting this working, though I can't see it yet.



2.  The catalog file itself.  I have this already as I've been using it from Saxon

3.  The Catalog manager properties file.  Again I've been using one of these from Saxon.



What is not clear to me is which one of these files needs to be specified in the <xmlcatalog> element.  Given that the properties file specifies the (relative) location of the catalog file itself I assume that's the one I need to specify.   Can someone please confirm this, or explain otherwise ?



The thing that's worrying me is that unless all these aspects are sorted then the system won't work.  And that I can't tell which one is wrong.



I am seeing the following messages :

"Apache resolver library not found, internal resolver will be used
Failed to load Apache resolver: java.lang.NoClassDefFoundError: org/apache/xml/resolver/tools/CatalogResolver"

Which looks like it's saying I haven't got the resolver loaded.



I hope someone can help.







Uncertainly,

Still,

Richard.









Richard Kerry
BNCS Engineer, SI SOL Telco & Media Vertical Practice
T: +44 (0)20 82259063[X]<thismessage:/Body.htm#>
M: +44 (0)7812 325518[X]<thismessage:/Body.htm#>
G300, Stadium House, Wood Lane, London, W12 7TA
richard.kerry@atos.net<https://webmail.siemens-it-solutions.com/owa/redir.aspx?C=9fb20d019e3e4cb99344d708709a3177&URL=mailto%3arichard.kerry%40atos.net>

This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Atos group liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitte
________________________________
From: Stefan Bodewig [bodewig@apache.org]
Sent: 31 August 2013 06:59
To: user@ant.apache.org
Subject: Re: Use of XML Catalog with Ant (xslt task) - request for example


On 2013-08-30, Kerry, Richard wrote:

> I'm still unclear about this.  Internally within Ant there seems to be
> a Classpath that is some combination of CLASSPATH environment
> variable, -cp parameter, <classpath>, <path id="classpath" >, <path
> id="class.path" >. <xslt ><classpath /></xslt>.

> Which one can/should I put my resolver's location in ?

<path id="..."/> just defines a PATH like structure.  Whether it
contributes to loading a class or not completely depends on where it is
used - if at all - via refid.  <path id> defines a global variable but
its id doesn't have any special meaning to Ant.

Whether you put classes into $CLASSPATH or -cp into -lib or $ANT_HOME/lib
or into nested <classpath> elements influences which classloaders they
end up in and what you can do with them.  Say jar A needs jar B and you
place jar A in $CLASSPATH then it will not find B if it isn't part of
$CLASSPATH as well even if you use -lib as $CLASSPATH populates the
system classloader and -lib a child of the system classloader that is
invisible to classes loaded via the system classloader.

Some general hints:

* don't use -cp at all.  Use the wrapper script shipping with Ant and
  one of the other options.

* don't try to mix where you place your jars that depend on each other.
  In the case of ant-resolver.jar and xml-resolver.jar I'd recommend to
  put them both into $ANT_HOME/lib or use -lib (this is equivalent) but
  never split them.  The alternative is to not put them into
  ANT_HOME/lib but use a nested <classpath> holding both of them
  instead.

* if you find yourself having to specify -lib all the time, use
  $ANT_HOME/lib

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org

Re: Use of XML Catalog with Ant (xslt task) - request for example

Posted by Stefan Bodewig <bo...@apache.org>.
On 2013-09-20, Kerry, Richard wrote:

> Thank you Stefan, that was very helpful, and informative regarding the path loading issues.

> I'm now definitely making some progress.

Sounds good.

> I've passed in ${resolverpath} via "-lib" and have ${catalogpath} in my <xmlcatalog>.

> Where ${resolverpath} is the full path, including ".jar", and
> ${catmanpath} is the full path to Catalog.xml.

> I now get :

> Ignoring Exception java.util.zip.ZipException: error in opening zip file reading resource META-INF/services/javax.xml.parsers.SAXParserFactory from C:\Projects\Tools_RK\DocBook-System\CatalogManager\Catalog.xml

This says Java thinks Catalog is jar - you're likely using ${catmanpath}
as part of something taht ends up on a classpath like thingy.  The
message might look anoying but doesn't do any harm in itself.

It likely is a remnant of your many attempts to get it working so far.
I must admit I feel sorry for the time you've already spent on this and
wish there was an easier way.  Me I haven't used xmlcatalog so far and
am just approaching it with some general knowledge how Ant works
internally.  Many thanks for your patience.

> "I don't think the properties file is required at all. "

> But, the properties file contains a control for verbosity, which can
> be useful in diagnosing problems within it.

I see.

> Is there another way of controlling that ?

I don't think so.  I'd try to put the properties file into the classpath
as well, i.e. add a -lib pointing to the directory holding the
properties file.  I'm not sure this will help.

> "[xslt] Loading stylesheet C:\Projects\Tools_RK\DocBook-System\WebHelp\CustomWebHelp.xsl"

> "resolve: 'webhelp/xsl/webhelp.xsl' with base: 'file:/C:/Projects/Tools_RK/DocBook-System/WebHelp/CustomWebHelp.xsl'

...

>      [xslt] : Error! C:\Projects\Tools_RK\DocBook-System\WebHelp\webhelp\xsl\webhelp.xsl (The system cannot find the path specified)"

> There is an xsl:import of 'webhelp/xsl/webhelp.xsl' in
> CustomWebHelp.xsl, so the first line of this block makes some sense.

> However, there is no
> C:\Projects\Tools_RK\DocBook-System\WebHelp\webhelp\xsl\webhelp.xsl,
> so although that Error line is correct I don't know why it's trying as
> there is a 'webhelp/xsl/webhelp.xsl' entry within Catalog.xml.

I'm just guessing here.  C:\Projects\Tools_RK\DocBook-System\WebHelp
seems to be your project's basedir and this is the default location to
resolve relative paths against.

xmlcatalog is supposed to resolve public ids, I must admit I don't know
what the transformer passes in a publicId to the URIResolver if the
import is a relative path.

Hmm, this
<http://xerces.apache.org/xml-commons/components/resolver/resolver-article.html>
suggests the URIResolver (which is used for xsl:import) applies to 
         <uri name="uri" uri="alternateuri"/>
entries only.  Is this what you have inside of your catalog?

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


RE: Use of XML Catalog with Ant (xslt task) - request for example

Posted by "Kerry, Richard" <ri...@atos.net>.

Thank you Stefan, that was very helpful, and informative regarding the path loading issues.

I'm now definitely making some progress.



I've passed in ${resolverpath} via "-lib" and have ${catalogpath} in my <xmlcatalog>.

Where ${resolverpath} is the full path, including ".jar", and ${catmanpath} is the full path to Catalog.xml.



where previously I got :



"Apache resolver library not found, internal resolver will be used
Warning: XML resolver not found; external catalogs will be ignored
Failed to load Apache resolver: java.lang.NoClassDefFoundError: org/apache/xml/resolver/tools/CatalogResolver
No matching catalog entry found, parser will use: 'profile-mode.xsl'"



I now get :



"Class org.apache.tools.ant.types.resolver.ApacheCatalogResolver loaded from parent loader (parentFirst)
Ignoring Exception java.util.zip.ZipException: error in opening zip file reading resource META-INF/services/javax.xml.parsers.SAXParserFactory from C:\Projects\Tools_RK\DocBook-System\CatalogManager\Catalog.xml
Couldn't load ResourceStream for META-INF/services/javax.xml.parsers.SAXParserFactory
Class com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl loaded from parent loader (parentFirst)
Apache resolver library found, xml-commons resolver will be used
Using catalogpath 'C:\Projects\Tools_RK\DocBook-System\CatalogManager\Catalog.xml'
Parsing C:\Projects\Tools_RK\DocBook-System\CatalogManager\Catalog.xml
Class com.sun.org.apache.xerces.internal.parsers.XIncludeAwareParserConfiguration loaded from parent loader (parentFirst)
Class com.sun.org.apache.xerces.internal.impl.dv.dtd.DTDDVFactoryImpl loaded from parent loader (parentFirst)
Ignoring Exception java.util.zip.ZipException: error in opening zip file reading resource META-INF/services/javax.xml.parsers.SAXParserFactory from C:\Projects\Tools_RK\DocBook-System\CatalogManager\Catalog.xml"



Which at least now indicates it's being found.

However it is not always getting the files I want, so something is still not right.

There are two <xslt> tasks in my ant file, the first is working correctly, ie imported files are being found at locations corresponding to what the catalog says (though as I can't set verbosity I can't check the logic for this).



Is the business about "error in opening zip file" worth noting ?  I don't think I need a zip file, do I ?  (I know .jar files are zip format - do I need another jar somewhere to make this work ?)



"Yes, you directly point to the catalog itself."

I've done that, as above.  However ...



"I don't think the properties file is required at all. "

But, the properties file contains a control for verbosity, which can be useful in diagnosing problems within it.

Is there another way of controlling that ?



Despite now having evidence that the resolver is being used I am still finding the problem in that the imported style file I'm using isn't being found.





However the second <xslt> task is not successfully finding its imports via the catalog.

I see the following in the log :



"[xslt] Loading stylesheet C:\Projects\Tools_RK\DocBook-System\WebHelp\CustomWebHelp.xsl"

This is as expected.



But later I get :



"resolve: 'webhelp/xsl/webhelp.xsl' with base: 'file:/C:/Projects/Tools_RK/DocBook-System/WebHelp/CustomWebHelp.xsl'
Class org.apache.tools.ant.types.resolver.ApacheCatalogResolver loaded from parent loader (parentFirst)
Ignoring Exception java.util.zip.ZipException: error in opening zip file reading resource META-INF/services/javax.xml.parsers.SAXParserFactory from C:\Projects\Tools_RK\DocBook-System\CatalogManager\Catalog.xml
Couldn't load ResourceStream for META-INF/services/javax.xml.parsers.SAXParserFactory
Class com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl loaded from parent loader (parentFirst)
Apache resolver library found, xml-commons resolver will be used
Ignoring Exception java.util.zip.ZipException: error in opening zip file reading resource META-INF/services/javax.xml.parsers.SAXParserFactory from C:\Projects\Tools_RK\DocBook-System\CatalogManager\Catalog.xml
Couldn't load ResourceStream for META-INF/services/javax.xml.parsers.SAXParserFactory
Class com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl loaded from parent loader (parentFirst)
Class com.sun.org.apache.xerces.internal.parsers.XIncludeAwareParserConfiguration loaded from parent loader (parentFirst)
Class com.sun.org.apache.xerces.internal.impl.dv.dtd.DTDDVFactoryImpl loaded from parent loader (parentFirst)
     [xslt] : Error! C:\Projects\Tools_RK\DocBook-System\WebHelp\webhelp\xsl\webhelp.xsl (The system cannot find the path specified)"



There is an xsl:import of 'webhelp/xsl/webhelp.xsl' in CustomWebHelp.xsl, so the first line of this block makes some sense.

However, there is no C:\Projects\Tools_RK\DocBook-System\WebHelp\webhelp\xsl\webhelp.xsl, so although that Error line is correct I don't know why it's trying as there is a  'webhelp/xsl/webhelp.xsl' entry within Catalog.xml.







Thank you again for your help so far.

I hope we can get this sorted as I think I am very nearly sorted now.





Appreciatively,

Richard.









Richard Kerry
BNCS Engineer, SI SOL Telco & Media Vertical Practice
T: +44 (0)20 82259063[X]<thismessage:/Body.htm#>
M: +44 (0)7812 325518[X]<thismessage:/Body.htm#>
G300, Stadium House, Wood Lane, London, W12 7TA
richard.kerry@atos.net<https://webmail.siemens-it-solutions.com/owa/redir.aspx?C=9fb20d019e3e4cb99344d708709a3177&URL=mailto%3arichard.kerry%40atos.net>

This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Atos group liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitte
________________________________
From: Stefan Bodewig [bodewig@apache.org]
Sent: 14 September 2013 05:48
To: user@ant.apache.org
Subject: Re: Use of XML Catalog with Ant (xslt task) - request for example


On 2013-09-13, Kerry, Richard wrote:

> "ant-resolver.jar and xml-resolver.jar "

> hang on a moment .............  what are these ?

> I thought I just needed resolver.jar from xml-commons-resolver-1.2
> (assuming that's the latest), so what are these two ?

xml-resolver.jar is the one from xml-commons, it comes under different
names, sorry for the confusion.

ant-resolver.jar is part of the Ant distribution and contains the
binding between Ant and the xml-commons resolver.

> And (previous response) I don't touch ant-apache-resolver.jar, which
> is already under ant/lib, as it's an internal library

Then resolver.jar from xml-commons must be there as well or things won't
work because of classloader delegation.

> What is not clear to me is which one of these files needs to be
> specified in the <xmlcatalog> element.  Given that the properties file
> specifies the (relative) location of the catalog file itself I assume
> that's the one I need to specify.  Can someone please confirm this, or
> explain otherwise ?

I don't think the properties file is required at all.  Yes, you directly
point to the catalog itself.

> I am seeing the following messages :

> "Apache resolver library not found, internal resolver will be used
> Failed to load Apache resolver: java.lang.NoClassDefFoundError: org/apache/xml/resolver/tools/CatalogResolver"

> Which looks like it's saying I haven't got the resolver loaded.

Right, see above.  The manual about xmlcatalog also has this innocent
note "but they will be ignored unless the resolver library from
xml-commons is available in the *system classpath*" (emphasis by me).
The resolver.jar from xml-commons must be either on CLASSPATH or inside
$ANT_HOME/lib or ~/.ant/lib or specified via -lib

Java builds a hierarchy of classloaders and the way Ant uses them
classes loaded high up in the hierarchy cannot see classes loaded
further down.  At the root there is CLASSPATH and nested <classpath>
elements are loaded via a loader further down the hierarchy.

Ant's binding to xml-resolver (the ant-resolver.jar) is loaded high up
in the hierarchy - at least higher than any <classpath> element - and so
the resolver.jar from xml-commons must be located at least as high
inside the hierarchy for Ant to find it.

In essence this is a case very similar to

<http://ant.apache.org/faq#delegating-classloader> if you ignore the
first sentence of the answer which is specific to <junit>.

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org

Re: Use of XML Catalog with Ant (xslt task) - request for example

Posted by Stefan Bodewig <bo...@apache.org>.
On 2013-09-13, Kerry, Richard wrote:

> "ant-resolver.jar and xml-resolver.jar "

> hang on a moment .............  what are these ?

> I thought I just needed resolver.jar from xml-commons-resolver-1.2
> (assuming that's the latest), so what are these two ?

xml-resolver.jar is the one from xml-commons, it comes under different
names, sorry for the confusion.

ant-resolver.jar is part of the Ant distribution and contains the
binding between Ant and the xml-commons resolver.

> And (previous response) I don't touch ant-apache-resolver.jar, which
> is already under ant/lib, as it's an internal library

Then resolver.jar from xml-commons must be there as well or things won't
work because of classloader delegation.

> What is not clear to me is which one of these files needs to be
> specified in the <xmlcatalog> element.  Given that the properties file
> specifies the (relative) location of the catalog file itself I assume
> that's the one I need to specify.  Can someone please confirm this, or
> explain otherwise ?

I don't think the properties file is required at all.  Yes, you directly
point to the catalog itself.

> I am seeing the following messages :

> "Apache resolver library not found, internal resolver will be used
> Failed to load Apache resolver: java.lang.NoClassDefFoundError: org/apache/xml/resolver/tools/CatalogResolver"

> Which looks like it's saying I haven't got the resolver loaded.

Right, see above.  The manual about xmlcatalog also has this innocent
note "but they will be ignored unless the resolver library from
xml-commons is available in the *system classpath*" (emphasis by me).
The resolver.jar from xml-commons must be either on CLASSPATH or inside
$ANT_HOME/lib or ~/.ant/lib or specified via -lib

Java builds a hierarchy of classloaders and the way Ant uses them
classes loaded high up in the hierarchy cannot see classes loaded
further down.  At the root there is CLASSPATH and nested <classpath>
elements are loaded via a loader further down the hierarchy.

Ant's binding to xml-resolver (the ant-resolver.jar) is loaded high up
in the hierarchy - at least higher than any <classpath> element - and so
the resolver.jar from xml-commons must be located at least as high
inside the hierarchy for Ant to find it.

In essence this is a case very similar to

<http://ant.apache.org/faq#delegating-classloader> if you ignore the
first sentence of the answer which is specific to <junit>.

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


RE: Use of XML Catalog with Ant (xslt task) - request for example

Posted by Martin Gainty <mg...@hotmail.com>.
 


 
> From: richard.kerry@atos.net
> To: user@ant.apache.org
> Subject: RE: Use of XML Catalog with Ant (xslt task) - request for example
> Date: Fri, 13 Sep 2013 16:08:08 +0000
> 
> 
> 
> Ok, right, good, back on this again for a while after a break .....
> 
> 
> 
> My preference is to do the job entirely within the Ant file, so using <classpath> MG><!-- include all necessary jars for taskdef aliased as xslt --><path id="classpath">
        <fileset dir="${lib.dir}" includes="**/ant-resolver.jar"/>        <fileset dir="${lib.dir}" includes="**/xml-resolver.jar"/>
    </path>MG>
or <classpathref>.MG>
<xslt ....classpathref="classpath"/MG>
> 
> I won't use -cp, as advised here.
> 
> I don't want to have to do any special copying after unpacking so I'd rather not copy jars into $ANT_HOME/lib if I don't need to.MG>you want to keep preserve $ANT_HOME/lib library for ANT specific jars
> 
> 
> 
> "ant-resolver.jar and xml-resolver.jar "
> 
> hang on a moment .............  what are these ?MG>resolver jars allow your ant target to 'resolve' either an ivy-file or artifact
MG>as an example lets say you have ivy-file and artifact in myrepo.jar specified as <jar name="my-local-jar-resolver" file="/home/me/myrepo.jar">
MG>ivy-file would be <ivy pattern="[organisation]/[module]/ivys/ivy-[revision].xml" />MG>translation:  resolve the ivy configuration file within myrepo.jar which matches the expression [organisation]/[module]/ivys/ivy-[revision].xml MG>artifact would be <artifact pattern="[organisation]/[module]/[type]s/[artifact]-[revision].[type]" MG>translation: resolve the artifact which matches the expression [organisation]/[module]/[type]s/[artifact]-[revision].[type]
MG>http://ant.apache.org/ivy/history/latest-milestone/resolver/jar.html
> 
> I thought I just needed resolver.jar from xml-commons-resolver-1.2 (assuming that's the latest), so what are these two ?
MG>xml-commons-resolver contains your xml-catalog-resolverMG>org.apache.xml.resolver.tools.CatalogResolverMG>This class provides a SAX (V6.1+) EntityResolver and a  URIResolver from JaxP
> 
> 
> And (previous response) I don't touch ant-apache-resolver.jar, which is already under ant/lib, as it's an internal library

MG>Makes Sense?
> 
> 
> 
> 
> 
> 
> Now, back to catalog-specific issues.
> 
> There are three components to resolving urls using a catalog that I haven't seen explained clearly yet for Ant.
> 
> 1.  The resolver.  The discussion above is about this.  I hope I'm getting closer to getting this working, though I can't see it yet.
> 
> 
> 
> 2.  The catalog file itself.  I have this already as I've been using it from Saxon
> 
> 3.  The Catalog manager properties file.  Again I've been using one of these from Saxon.
> 
> 
> 
> What is not clear to me is which one of these files needs to be specified in the <xmlcatalog> element.  Given that the properties file specifies the (relative) location of the catalog file itself I assume that's the one I need to specify.   Can someone please confirm this, or explain otherwise ?
> 
> 
> 
> The thing that's worrying me is that unless all these aspects are sorted then the system won't work.  And that I can't tell which one is wrong.
> 
> 
> 
> I am seeing the following messages :
> 
> "Apache resolver library not found, internal resolver will be used
> Failed to load Apache resolver: java.lang.NoClassDefFoundError: org/apache/xml/resolver/tools/CatalogResolver"
> 
> Which looks like it's saying I haven't got the resolver loaded.
> 
> 
> 
> I hope someone can help.
> 
> 
> 
> 
> 
> 
> 
> Uncertainly,
> 
> Still,
> 
> Richard.
> 
> 
> 
> 
> 
> 
> 
> 
> 
> Richard Kerry
> BNCS Engineer, SI SOL Telco & Media Vertical Practice
> T: +44 (0)20 82259063[X]<thismessage:/Body.htm#>
> M: +44 (0)7812 325518[X]<thismessage:/Body.htm#>
> G300, Stadium House, Wood Lane, London, W12 7TA
> richard.kerry@atos.net<https://webmail.siemens-it-solutions.com/owa/redir.aspx?C=9fb20d019e3e4cb99344d708709a3177&URL=mailto%3arichard.kerry%40atos.net>
> 
> This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Atos group liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitte
> ________________________________
> From: Stefan Bodewig [bodewig@apache.org]
> Sent: 31 August 2013 06:59
> To: user@ant.apache.org
> Subject: Re: Use of XML Catalog with Ant (xslt task) - request for example
> 
> 
> On 2013-08-30, Kerry, Richard wrote:
> 
> > I'm still unclear about this.  Internally within Ant there seems to be
> > a Classpath that is some combination of CLASSPATH environment
> > variable, -cp parameter, <classpath>, <path id="classpath" >, <path
> > id="class.path" >. <xslt ><classpath /></xslt>.
> 
> > Which one can/should I put my resolver's location in ?
> 
> <path id="..."/> just defines a PATH like structure.  Whether it
> contributes to loading a class or not completely depends on where it is
> used - if at all - via refid.  <path id> defines a global variable but
> its id doesn't have any special meaning to Ant.
> 
> Whether you put classes into $CLASSPATH or -cp into -lib or $ANT_HOME/lib
> or into nested <classpath> elements influences which classloaders they
> end up in and what you can do with them.  Say jar A needs jar B and you
> place jar A in $CLASSPATH then it will not find B if it isn't part of
> $CLASSPATH as well even if you use -lib as $CLASSPATH populates the
> system classloader and -lib a child of the system classloader that is
> invisible to classes loaded via the system classloader.
> 
> Some general hints:
> 
> * don't use -cp at all.  Use the wrapper script shipping with Ant and
>   one of the other options.
> 
> * don't try to mix where you place your jars that depend on each other.
>   In the case of ant-resolver.jar and xml-resolver.jar I'd recommend to
>   put them both into $ANT_HOME/lib or use -lib (this is equivalent) but
>   never split them.  The alternative is to not put them into
>   ANT_HOME/lib but use a nested <classpath> holding both of them
>   instead.
> 
> * if you find yourself having to specify -lib all the time, use
>   $ANT_HOME/lib
> 
> Stefan
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org