ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gilson Nascimento D Elrei <gilson....@cpm.com.br>
Subject RES: I can't to generate the jar file in this sample. It has work ed!
Date Mon, 26 Aug 2002 19:47:43 GMT
Thanks Joyce and Jacob for yours attention, 
The Joyce's sample has worked for me now! ;-)
Gilson

> ----- Mensagem original -----
> De:		Joyce Li [SMTP:jli@dwl.com]
> Enviada em:		segunda-feira, 26 de agosto de 2002 16:40
> Para:		Ant Users List
> Assunto:		Re: I can't to generate the jar file in this
> sample...
> 
> The jar didn't get built because you never called the <jar> target.  That
> is why
> Ant returns with only two
> targets concluded (Init and build targets).
> 
> Try
> 
>         <target name="build" depends="init, compile, jar"/>
> 
>         <target name="compile" depends="init">
>                 <javac srcdir="${Src}" destdir="${Dest}"
>                            includes="org/varnam/**">
>                         <classpath>
>                              <pathelement
> location="c:\jdk1.3.1_02\jre\lib\rt.jar"/>
>                               <pathelement location="${Src}"/>
>                         </classpath>
>                 </javac>
>         </target>
>         <target name="jar" depends="build">
>                 <jar destfile="${jardir}/hello.jar" basedir="${Dest}"
>                         includes="org/varnam/**" />
>         </target>
> </project>
> 
> Joyce
> 
> Gilson Nascimento D Elrei wrote:
> 
> > I have the follow directory structure on my C: Drive, with one 1 source
> file
> > entitle hello.java :
> >      work
> >       |
> >       |__hello
> >           |-----build.xml                           << The Ant File
> > (Build.xml)
> >           |
> >           |__ classes
> >           |     |
> >           |     |__org
> >           |         |
> >           |         |__varnam
> >           |-- src
> >           |    |
> >           |    |__org
> >           |         |
> >           |         |__varnam
> >           |              |
> >           |              |__hello.java               <<-- my souce
> sample
> > code
> >           |__jars
> >
> > Now, i want to compile hello.java, put the class file generated on
> > Work\Hello\classes\org\varnam and finally generate the jar file from the
> > previous class file generated and copy it to work\hello\jars directory.
> > It's simple and i got to compile it and generate the class file
> > (hello.class),  but the target Jar fail, but i don't receive some error
> > message. The Ant return a successfull message on dos box with only two
> > targets concluded (Init and build targets).
> > Below is my build.xml source file:
> >
> > <!-- C:\work\hello is my initial basedir -->
> >
> > <project name="hello" default="build" basedir=".">
> >         <target name="init">
> >                 <property name="jardir" value="jars"/>
> >                 <property name="Src" value="src"/>
> >                 <property name="Dest" value="classes"/>
> >         </target>
> >         <target name="build" depends="init">
> >                 <javac srcdir="${Src}" destdir="${Dest}"
> > includes="org/varnam/**">
> >                         <classpath>
> >                                                 <pathelement
> > location="c:\jdk1.3.1_02\jre\lib\rt.jar"/>
> >                                 <pathelement location="${Src}"/>
> >                         </classpath>
> >                 </javac>
> >         </target>
> >         <target name="jar" depends="build">
> >                 <jar destfile="${jardir}/hello.jar" basedir="${Dest}"
> > includes="org/varnam/**" />
> >         </target>
> > </project>
> >
> > thanks for any comments.
> >
> > Gilson
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
> <mailto:ant-user-unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail:
> <mailto:ant-user-help@jakarta.apache.org>
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>

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


Mime
View raw message