ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From WebServices Development <WebServices_Developm...@csx.com>
Subject Need help with ANT javac classpath
Date Mon, 15 Sep 2014 15:15:51 GMT
I have an old application which is using JAXB version 1.0.  When I pull in the projects in
Eclipse, it compiles fine because it references the jaxb jars from my web-inf/lib.



When I am defining an ANT javac task for it, I get compilation errors because the jaxb classes
from rt.jar take preference.  I have not included the jars from JAVA_HOME in my javac task's
classpath.



How can I set-up my javac task such that my project will still compile with ANT as it does
in Eclipse?



P.S - I tried adding includejavaruntime="false"   and    includeantruntime="false" attributes
-  both together as well as individually - to the javac task - but I still get the error.
 The error is  -  createBinder() in ObjectFactory cannot override createBinder() in JAXBContext



Because it seems that when compiling in Eclipse, it uses the JAXBContext from the jaxb-api.jar
that is part of the project whereas when running ANT javac, it uses the JAXBContext from rt.jar
– which gets added to the classpath when running ANT – not part of my classpath parameter
to javac.



What do I need to do to get this fixed?


This email transmission and any accompanying attachments may contain CSX privileged and confidential
information intended only for the use of the intended addressee. Any dissemination, distribution,
copying or action taken in reliance on the contents of this email by anyone other than the
intended recipient is strictly prohibited. If you have received this email in error please
immediately delete it and notify sender at the above CSX email address. Sender and CSX accept
no liability for any damage caused directly or indirectly by receipt of this email.
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message