https://issues.apache.org/bugzilla/show_bug.cgi?id=47926

           Summary: pathelement 'ant.jar' of path 'tomcat.classpath' is
                    needless in build.xml
           Product: Tomcat 6
           Version: 6.0.20
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: trivial
          Priority: P2
         Component: Catalina
        AssignedTo: dev@tomcat.apache.org
        ReportedBy: qingyang...@qunar.com


following is the relevant parts of the 'build.xml' file:

<path id="tomcat.classpath">
    <pathelement location="${ant.jar}"/>
    <pathelement location="${jdt.jar}"/>
</path>

... ...
<target name="compile">
     <javac srcdir="java" destdir="${tomcat.classes}"
           debug="${compile.debug}"
           deprecation="${compile.deprecation}"
           source="${compile.source}"
           target="${compile.target}"
           optimize="${compile.optimize}"
           excludes="**/CVS/**,**/.svn/**"
           encoding="ISO-8859-1">
<!-- Comment this in to show unchecked warnings:     <compilerarg
value="-Xlint:unchecked"/> -->
      <classpath refid="tomcat.classpath" />
      <exclude name="org/apache/naming/factory/webservices/**" />
     </javac>
     ... ...
</target>



However, if you delete the first item (<pathelement location="${ant.jar}"/>) in
the path element whose id is 'tomcat.classpath', the target of 'compile' still
runs successfully, and if you invoke ant as "ant -v", you can see that
'ant.jar' has already been included in the classpath. For example, the
following is the output on my machine:

... ...
Compiling 1052 source files to
/home/xuqy/Downloads/apache-tomcat-6.0.20-src/output/classes
    [javac] Using modern compiler
    [javac] Compilation arguments:
    [javac] '-d'
    [javac] '/home/xuqy/Downloads/apache-tomcat-6.0.20-src/output/classes'
    [javac] '-classpath'
    [javac]
'/home/xuqy/Downloads/apache-tomcat-6.0.20-src/output/classes:/home/xuqy/tomcat-base-path/eclipse/plugins/org.eclipse.jdt.core_3.3.1.v_780_R33x.jar:/usr/local/apache-ant-1.7.1/lib/ant-launcher.jar:/usr/local/apache-ant-1.7.1/lib/xercesImpl.jar:/usr/local/apache-ant-1.7.1/lib/ant-jdepend.jar:/usr/local/apache-ant-1.7.1/lib/ant-javamail.jar:/usr/local/apache-ant-1.7.1/lib/ant-commons-net.jar:/usr/local/apache-ant-1.7.1/lib/ant-apache-oro.jar:/usr/local/apache-ant-1.7.1/lib/ant.jar:/usr/local/apache-ant-1.7.1/lib/ant-weblogic.jar:/usr/local/apache-ant-1.7.1/lib/xml-apis.jar:/usr/local/apache-ant-1.7.1/lib/ant-jmf.jar:/usr/local/apache-ant-1.7.1/lib/ant-trax.jar:/usr/local/apache-ant-1.7.1/lib/ant-jsch.jar:/usr/local/apache-ant-1.7.1/lib/ant-commons-logging.jar:/usr/local/apache-ant-1.7.1/lib/ant-apache-regexp.jar:/usr/local/apache-ant-1.7.1/lib/ant-swing.jar:/usr/local/apache-ant-1.7.1/lib/ant-junit.jar:/usr/local/apache-ant-1.7.1/lib/ant-testutil.jar:/usr/local/apache-ant-1.7.1
 
/lib/ant-antlr.jar:/usr/local/apache-ant-1.7.1/lib/ant-jai.jar:/usr/local/apache-ant-1.7.1/lib/ant-nodeps.jar:/usr/local/apache-ant-1.7.1/lib/ant-apache-bsf.jar:/usr/local/apache-ant-1.7.1/lib/ant-apache-resolver.jar:/usr/local/apache-ant-1.7.1/lib/ant-netrexx.jar:/usr/local/apache-ant-1.7.1/lib/ant-starteam.jar:/usr/local/apache-ant-1.7.1/lib/ant-apache-log4j.jar:/usr/local/apache-ant-1.7.1/lib/ant-stylebook.jar:/usr/local/apache-ant-1.7.1/lib/ant-apache-bcel.jar:/usr/lib/jvm/java-6-sun-1.6.0.16/lib/tools.jar'
    [javac] '-sourcepath'
    [javac] '/home/xuqy/Downloads/apache-tomcat-6.0.20-src/java'
    [javac] '-target'
    [javac] '1.5'
    [javac] '-g'
    [javac] '-source'
    [javac] '1.5'

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to