ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fernando Padilla <f...@interdimensions.com>
Subject path question
Date Fri, 13 Jul 2001 14:38:46 GMT

I have just been attempting to use a path element from within a task. Ant
1.3 will not allow me to do this.  The build.xml follows...

I want to declare the path element to use as my classpath.  I use to do
this out side of a task.  But for this project we have the "init" task,
and the classpath could depend on properties defined within that init.. so
I can't define the path element outside of the task..

ideas??



<project name="dbXML" default="main" basedir=".">

  <target name="init">
    <property name="name" value="dbXML"/>
    <property name="version" value="0.9"/>
    <property name="year" value="2001"/>

    <property name="distrib.name" value="${name}-${version}"/>
    <property name="distrib.dir"
value="${distrib.build.dir}/${distrib.name}"/>
    <property name="jarname" value="${name}"/>

  <property name="root.dir" value="."/>
  <property name="jar.dir" value="${root.dir}/lib"/>
  <property name="src.dir" value="${root.dir}/src"/>
  <property name="build.dir" value="${root.dir}/classes"/>
  <property name="distrib.build.dir" value=".."/>

  <path id="project.class.path">
    <fileset dir="${jar.dir}">
      <include name="**/*.jar" />
    </fileset>
    <pathelement location="${build.dir}" />
    <pathelement path="${java.class.path}" />
  </path>

  </target>

<!-- ...... -->

</project>


Mime
View raw message