ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Erickson" <derick...@cmcflex.com>
Subject Re: Path References Nightmares
Date Sat, 03 Jul 2004 17:54:26 GMT
And after an hour of messing with it and typing this message I figure it out
5 minutes later... lovely =)

I just needed to move my taskdef down after the global path reference since
it was referring to it.
-David

----- Original Message ----- 
From: "David Erickson" <derickson@cmcflex.com>
To: "Ant User Mailing List" <user@ant.apache.org>
Sent: Saturday, July 03, 2004 11:43 AM
Subject: Path References Nightmares


> Hi everyone.. for the life of me I can't figure out why my global path
> reference isn't working.. using ant 1.5.4.. when i run ant test this is
what
> I get:
>
> Buildfile: build.xml
>
> BUILD FAILED
> Reference project.class.path not found.
>
> Total time: 0 seconds
>
> Here's my file:
>
> <project name="myProject" default="test" basedir=".">
>  <property environment="env"/>
>  <property file="build.properties"/>
>  <property name="build.compiler" value="modern"/>
>  <property name="src.dir" value="src"/>
>  <property name="src.java.dir" value="${src.dir}/java"/>
>  <property name="src.test.dir" value="${src.dir}/test"/>
>
>  <property name="target.dir" value="target"/>
>  <property name="target.classes.java.dir"
> value="${target.dir}/classes/java"/>
>  <property name="target.classes.test.dir"
> value="${target.dir}/classes/test"/>
>  <property name="target.report.dir" value="${target.dir}/reports"/>
>
>  <taskdef name="schemaupdate"
> classname="net.sf.hibernate.tool.hbm2ddl.SchemaUpdateTask"
> classpathref="project.class.path"/>
>
>  <path id="project.class.path">
>   <pathelement location="${env.CATALINA_HOME}/common/lib"/>
>   <fileset dir="web/WEB-INF/lib">
>    <include name="**/*.jar"/>
>   </fileset>
>   <dirset dir="web/WEB-INF/classes">
>    <include name="**/*"/>
>   </dirset>
>   <dirset dir="${target.classes.java.dir}">
>    <include name="**/*"/>
>   </dirset>
>   <dirset dir="${target.classes.test.dir}">
>    <include name="**/*"/>
>   </dirset>
>   <fileset dir="${env.JAVA_HOME}">
>    <include name="**/*.jar"/>
>   </fileset>
>  </path>
>  <target name="SchemaUpdate">
>   <schemaupdate
>   properties="${basedir}/hibernate.properties"
>   quiet="no">
>    <fileset dir="${basedir}/web/WEB-INF/classes">
>     <include name="**/*.hbm.xml"/>
>    </fileset>
>   </schemaupdate>
>  </target>
>
>  <target name="compile.java">
>   <mkdir dir="${target.classes.java.dir}"/>
>   <javac destdir="${target.classes.java.dir}">
>    <src path="${src.java.dir}"/>
>    <classpath refid="${project.class.path}"/>
>   </javac>
>  </target>
>
>  <target name="compile.test" depends="compile.java">
>   <mkdir dir="${target.classes.test.dir}"/>
>   <javac destdir="${target.classes.test.dir}">
>    <src path="${src.test.dir}"/>
>    <classpath refid="${project.class.path}"/>
>   </javac>
>  </target>
>
>  <target name="test" depends="compile.java">
>   <mkdir dir="${target.report.dir}"/>
>   <property name="tests" value="*Test"/>
>   <junit printsummary="yes" haltonerror="yes" haltonfailure="yes"
> fork="yes">
>    <formatter type="xml"/>
>    <batchtest fork="yes" todir="${reports.tests}">
>     <fileset dir="${src.test.dir}">
>      <include name="**/${tests}.java"/>
>     </fileset>
>    </batchtest>
>    <classpath refid="${project.class.path}"/>
>   </junit>
>  </target>
>
>  <target name="clean">
>   <delete dir="${target.dir}"/>
>  </target>
> </project>
>
> Everything looked good to me but it won't work and is driving me nuts.
> Thanks in advance!!
> -David
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message