ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From peter reilly <peter.rei...@corvil.com>
Subject Re: AW: build.xml jar target problem
Date Tue, 08 Jul 2003 11:12:58 GMT
The problem I think is that the build dir is
different from the classes dir.


> 
> >   <!-- Directories -->
> >   <property name="src"          value="${basedir}/src"/>     
> > <!-- Source -->
> >   <property name="lib"          value="${basedir}/lib"/>     
> > <!-- External packages/jar files -->
> >   <property name="build"        value="${basedir}/build"/>   
> > <!-- Build directory -->
> >   <property name="classes"      value="${build}/classes"/>   
> > <!-- Compiled source files -->
> >   <property name="doc"          value="${basedir}/doc"/>     
> > <!-- Documentation -->
> >   <property name="javadoc"      value="${doc}/javadoc"/>     
> > <!-- Javadoc documentation -->
> >   <property name="dist"         value="${basedir}/dist"/>    
> > <!-- Distro = jar, source and doc -->
> >   <property name="jar"          value="${dist}/jar"/>        
> > <!-- Jar file directory -->
> > 
> >   
> >   <!-- Initialization -->
> >   <target name="init">
> >     <tstamp/>
> >     <mkdir dir="${build}"/>
> >     <mkdir dir="${classes}"/>
> >     <mkdir dir="${doc}"/>
> >     <mkdir dir="${javadoc}"/>
> >     <mkdir dir="${dist}"/>
> >     <mkdir dir="${jar}"/>
> >   </target>
> > 
> >   <!-- Copy icons -->
> >   <target name="icons" depends="init">
> >     <copy todir="${build}/icons">
> >       <fileset dir="${basedir}" includes="icons/*.gif"/>
> >     </copy>
> >   </target>
> >   
> >   <!-- Build all classes -->
> >   <target name="build" depends="init,icons">
> >      <javac srcdir="${src}" destdir="${classes}"/>
> >   </target>
generated classes go to build/classes
> > 
> > 
> >   <!-- Build documentation -->
> >   <target name="javadoc" depends="init">
> >     <javadoc sourcepath="${src}" destdir="${javadoc}"
> >       access="public"
> >       packagenames="no.uio.labmed.*">
> >       <link href="${apiurl}"/>
> >     </javadoc>
> >   </target> 
> > 
> >   <!-- Build jar file -->
> >   <target name="jar" depends="init,icons,build">
> >     <jar jarfile="${jar}/${ant.project.name}.${DSTAMP}.jar">
> >       <manifest>
> >         <attribute name="Built-By" value="${user.name}"/>
> >         <attribute name="Main-Class" value="no.uio.labmed.InterGene"/>
> >       </manifest>
> >       <fileset dir="${build}" includes="**/*.class"/>
jared from build, this should be
    <fileset dir="${classes}" includes="**/*.class"/>

> >       <fileset dir="${build}" includes="**/*.gif"/>
this perhaps should be
    <fileset dir="${build}/icons" includes="**/*.gif"/>

> >     </jar>
> >   </target>
> > 
> >   <!-- Build distro -->
> >   <target name="dist" depends="init,icons,build,javadoc,jar">
> >     <copy todir="${dist}/javadoc">
> >       <fileset dir="${javadoc}" includes="**/*"/>
> >     </copy>
> >   </target>
> > 
> >   <!-- Clean up -->
> >   <target name="clean">
> >     <delete dir="${build}"/>
> >     <delete dir="${doc}"/>
> >     <delete dir="${dist}"/>
> >   </target>
> > 
> > </project>
> > 
> > TIA,
> >  
> > Karin
> > -- 
> > Karin Lagesen, PhD student
> > karin.lagesen@labmed.uio.no
> > 
> > ---------------------------------------------------------------------
> > 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