ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Prakash, Dharma" <Dharma_Prak...@csx.com>
Subject FW: Using jdk 1.6 wildcard in classpath using Ant 1.8.4
Date Thu, 10 Jan 2013 15:46:55 GMT
Hi,

I am trying to load external library by using jdk1.6 wild card syntax in Ant 1.8.4  and I
get the below error, can anyone help me how to resolve this issue?
Below is my error and build script I am using..

Buildfile: C:\CCSTG\Workspace_V7\AntBuildTest\build.xml
init:
compile:
     [echo] XXXXXXXXXXX:C:\CCSTG\build\lib\*
     [echo] XXXXXXXXXXX: 1.6
     [echo] XXXXXXXXXXX: Apache Ant(TM) version 1.8.4 compiled on May 22 2012
    [javac] Compiling 1 source file to C:\CCSTG\build\build
    [javac] [parsing started C:\CCSTG\build\src\HelloWorld.java]
    [javac] [parsing completed 16ms]
    [javac] [search path for source files: C:\CCSTG\build\src]
    [javac] [search path for class files: C:\rational\ibm\sdpshared\jdk\jre\lib\endorsed\javax.j2ee.annotation.jar,C:\rational\ibm\sdpshared\jdk\jre\lib\endorsed\jaxb-api.jar,C:\rational\ibm\sdpshared\jdk\jre\lib\endorsed\jaxws-api.jar,C:\rational\ibm\sdpshared\jdk\jre\lib\vm.jar,C:\rational\ibm\sdpshared\jdk\jre\lib\annotation.jar,C:\rational\ibm\sdpshared\jdk\jre\lib\beans.jar,C:\rational\ibm\sdpshared\jdk\jre\lib\java.util.jar,C:\rational\ibm\sdpshared\jdk\jre\lib\jndi.jar,C:\rational\ibm\sdpshared\jdk\jre\lib\logging.jar,C:\rational\ibm\sdpshared\jdk\jre\lib\security.jar,C:\rational\ibm\sdpshared\jdk\jre\lib\sql.jar,C:\rational\ibm\sdpshared\jdk\jre\lib\ibmorb.jar,C:\rational\ibm\sdpshared\jdk\jre\lib\ibmorbapi.jar,C:\rational\ibm\sdpshared\jdk\jre\lib\ibmcfw.jar,C:\rational\ibm\sdpshared\jdk\jre\lib\rt.jar,C:\rational\ibm\sdpshared\jdk\jre\lib\charsets.jar,C:\rational\ibm\sdpshared\jdk\jre\lib\resources.jar,C:\rational\ibm\sdpshared\jdk\jre\lib\ibmpkcs.jar,C:\rational\ibm\sdpshared\jdk\jre\lib\ibmcertpathfw.jar,C:\rational\ibm\sdpshared\jdk\jre\lib\ibmjgssfw.jar,C:\rational\ibm\sdpshared\jdk\jre\lib\ibmjssefw.jar,C:\rational\ibm\sdpshared\jdk\jre\lib\ibmsaslfw.jar,C:\rational\ibm\sdpshared\jdk\jre\lib\ibmjcefw.jar,C:\rational\ibm\sdpshared\jdk\jre\lib\ibmjgssprovider.jar,C:\rational\ibm\sdpshared\jdk\jre\lib\ibmjsseprovider2.jar,C:\rational\ibm\sdpshared\jdk\jre\lib\ibmcertpathprovider.jar,C:\rational\ibm\sdpshared\jdk\jre\lib\ibmxmlcrypto.jar,C:\rational\ibm\sdpshared\jdk\jre\lib\management-agent.jar,C:\rational\ibm\sdpshared\jdk\jre\lib\xml.jar,C:\rational\ibm\sdpshared\jdk\jre\lib\jlm.jar,C:\rational\ibm\sdpshared\jdk\jre\lib\javascript.jar,C:\rational\ibm\sdpshared\jdk\jre\lib\ext\CmpCrmf.jar,C:\rational\ibm\sdpshared\jdk\jre\lib\ext\dnsns.jar,C:\rational\ibm\sdpshared\jdk\jre\lib\ext\dtfj-interface.jar,C:\rational\ibm\sdpshared\jdk\jre\lib\ext\dtfj.jar,C:\rational\ibm\sdpshared\jdk\jre\lib\ext\dtfjview.jar,C:\rational\ibm\sdpshared\jdk\jre\lib\ext\gskikm.jar,C:\rational\ibm\sdpshared\jdk\jre\lib\ext\healthcenter.jar,C:\rational\ibm\sdpshared\jdk\jre\lib\ext\ibmcmsprovider.jar,C:\rational\ibm\sdpshared\jdk\jre\lib\ext\ibmjcefips.jar,C:\rational\ibm\sdpshared\jdk\jre\lib\ext\ibmjceprovider.jar,C:\rational\ibm\sdpshared\jdk\jre\lib\ext\ibmkeycert.jar,C:\rational\ibm\sdpshared\jdk\jre\lib\ext\IBMKeyManagementServer.jar,C:\rational\ibm\sdpshared\jdk\jre\lib\ext\ibmpkcs11impl.jar,C:\rational\ibm\sdpshared\jdk\jre\lib\ext\ibmsaslprovider.jar,C:\rational\ibm\sdpshared\jdk\jre\lib\ext\IBMSecureRandom.jar,C:\rational\ibm\sdpshared\jdk\jre\lib\ext\ibmxmlencprovider.jar,C:\rational\ibm\sdpshared\jdk\jre\lib\ext\jaccess.jar,C:\rational\ibm\sdpshared\jdk\jre\lib\ext\JavaDiagnosticsCollector.jar,C:\rational\ibm\sdpshared\jdk\jre\lib\ext\JawBridge.jar,C:\rational\ibm\sdpshared\jdk\jre\lib\ext\jdmpview.jar,C:\rational\ibm\sdpshared\jdk\jre\lib\ext\localedata.jar,C:\rational\ibm\sdpshared\jdk\jre\lib\ext\xmlencfw.jar,C:\CCSTG\build\build,C:\CCSTG\build\lib\*]
    [javac] C:\CCSTG\build\src\HelloWorld.java:3: package org.apache.commons.lang does not
exist
    [javac] import org.apache.commons.lang.StringUtils;
    [javac]                               ^
    [javac] [loading java\lang\Object.class(java\lang:Object.class)]
    [javac] [loading java\lang\String.class(java\lang:String.class)]
    [javac] [checking com.csx.shipcsx.umler.HelloWorld]
    [javac] [loading java\lang\System.class(java\lang:System.class)]
    [javac] [loading java\io\PrintStream.class(java\io:PrintStream.class)]
    [javac] [loading java\io\FilterOutputStream.class(java\io:FilterOutputStream.class)]
    [javac] [loading java\io\OutputStream.class(java\io:OutputStream.class)]
    [javac] C:\CCSTG\build\src\HelloWorld.java:9: cannot find symbol
    [javac] symbol  : variable StringUtils
    [javac] location: class com.csx.shipcsx.umler.HelloWorld
    [javac]         StringUtils.isNotBlank(s);
    [javac]         ^
    [javac] [total 281ms]
    [javac] 2 errors

BUILD FAILED
C:\CCSTG\Workspace_V7\AntBuildTest\build.xml:39: Compile failed; see the compiler error output
for details.

Total time: 905 milliseconds


Below is the Script

<?xml version="1.0" encoding="UTF-8"?>
<!-- ======================================================================
     Jan 8, 2013 12:17:19 PM

     project
     description

     v1073
     ====================================================================== -->
<project name="MyProject" default="dist" basedir="C:\CCSTG\build\">
    <description>
        simple example build file
    </description>
  <!-- set global properties for this build -->
  <property name="src" location="src"/>
  <property name="build" location="build"/>
  <property name="dist"  location="dist"/>

  <target name="init">
    <!-- Create the time stamp -->
    <tstamp/>
    <!-- Create the build directory structure used by compile -->
    <mkdir dir="${build}"/>
  </target>

  <target name="compile" depends="init"
        description="compile the source " >
       <path id="project.class.path">
            <pathelement location="lib\*" />
        </path>


      <echo message="XXXXXXXXXXX:${toString:project.class.path}" />
      <echo message="XXXXXXXXXXX: ${ant.java.version}" />
      <echo message="XXXXXXXXXXX: ${ant.version}" />

    <!-- Compile the java code from ${src} into ${build} -->
    <javac srcdir="${src}" destdir="${build}"
      verbose="true" includeantruntime="false" debug="on"  classpathref="project.class.path">

      <!--classpath location='C:\CCSTG\build\lib\commons-lang.jar'></classpath-->
    </javac>

  </target>

  <target name="dist" depends="compile"
        description="generate the distribution" >
    <!-- Create the distribution directory -->
    <mkdir dir="${dist}/lib"/>

    <!-- Put everything in ${build} into the MyProject-${DSTAMP}.jar file -->
    <jar jarfile="${dist}/lib/MyProject-${DSTAMP}.jar" basedir="${build}"/>
  </target>

  <target name="clean"
        description="clean up" >
    <!-- Delete the ${build} and ${dist} directory trees -->
    <delete dir="${build}"/>
    <delete dir="${dist}"/>
  </target>
</project>







-----------------------------------------
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