ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stephane vaucher <vauc...@LUB.UMontreal.CA>
Subject java task and classpath
Date Wed, 23 Jan 2002 18:11:07 GMT
Hello everyone,

I have a problem using the nested references in nested <classpath>
attributes. Ant seems to refuse to accept classpaths like the following:

   <pathelement path="${project.classpath}"/>

In such a case, ant uses its own classpath (from executing
$ANT_HOME/bin/ant). If I add another element in the classpath such as:

   <pathelement path="${project.classpath}"/>
   <pathelement location="./lib/core.jar" />

Ant now only gives me a classpath with "./".

in a case without references, it works fine:

   <pathelement path="./classes"/>
   <pathelement location="./lib/core.jar" />

Ant now only gives me a classpath with "./".

I don't know if we can use the echo task to print out the content of
variables, so I wrote a simple Test class that prints out the classpath
I haven't seen anyone with a similar problem in the mailing list except
maybe forked JVM's classpath not clean when using JUnit task. Since I
have no knowledge of JUnit, I'll assume fornow it's unrelated.

------------ ant execution script changes ----------------

# SV 2001/11/08
export JAVA_HOME=/usr/java

------------- Code except --------------

<project name="NADIM" default="all" basedir=".">

 <!-- defines all of the homes -->
 <property file="" />


 <path id="project.classpath">
   <path refid="jini.path" />
   <path refid="weblogic.path" />
   <fileset dir="${lib}">
     <include name="**/*.jar"/>


 <target name="ejbmake">
   <!-- should be weblogic.ejbc20,
        Test only prints out the classpath
   <java classname="Test" fork="yes" >
      <sysproperty key="weblogic.home" value="${weblogic.home}"/>
      <arg value="-verbose"/>
      <arg value="${ejbtmp}"/>
      <arg value="${ejbjar}"/>
    <pathelement path="${project.classpath}"/>


-------------- Environment ------------------
Ant 1.4.1
java version "1.3.1"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1-b24)
Java HotSpot(TM) Client VM (build 1.3.1-b24, mixed mode)

Stephane Vaucher
Research Professional

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message