ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 1643] New - javac uses incorrect classpath
Date Mon, 07 May 2001 17:03:59 GMT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=1643

*** shadow/1643	Mon May  7 10:03:59 2001
--- shadow/1643.tmp.17038	Mon May  7 10:03:59 2001
***************
*** 0 ****
--- 1,48 ----
+ +============================================================================+
+ | javac uses incorrect classpath                                             |
+ +----------------------------------------------------------------------------+
+ |        Bug #: 1643                        Product: Ant                     |
+ |       Status: NEW                         Version: 1.3                     |
+ |   Resolution:                            Platform: PC                      |
+ |     Severity: Blocker                  OS/Version:                         |
+ |     Priority: High                      Component: Core tasks              |
+ +----------------------------------------------------------------------------+
+ |  Assigned To: ant-dev@jakarta.apache.org                                   |
+ |  Reported By: mgaffney@unwiredexpress.com                                  |
+ |      CC list: Cc:                                                          |
+ +----------------------------------------------------------------------------+
+ |          URL:                                                              |
+ +============================================================================+
+ |                              DESCRIPTION                                   |
+ When building a project, the javac task implicitly includes all org.w3c.dom.* 
+ classes in the build classpath.  Because of this, a project which depends on 
+ the XML classes and does not explicitly include these classes on the javac 
+ classpath will not throw the expected error.
+ 
+ This is an extremely severe problem for two reasons:
+ 1. Using ANT there is no way to know which classes (and versions of those 
+ classes) your project was actually built against.
+ 2. A component built with ANT could fail at runtime because there is no way to 
+ know what the classpath settings should be. 
+ 
+ Here is an example:
+ 
+ This build.xml file:
+ 
+ <project name="AntXMLBug" default="compile" basedir=".">
+ 
+   <target name="compile">
+     <javac srcdir="." destdir="."/>
+   </target>
+ 
+ </project>
+ 
+ Used for this java class:
+ 
+ import org.w3c.dom.*;
+ 
+ public class AntXMLBug
+ {
+ }
+ 
+ Should fail, but it does not.

Mime
View raw message