ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Dantas Rocha <ad-ro...@uol.com.br>
Subject RES: Convert to Ant
Date Mon, 25 Oct 2004 12:33:01 GMT
Thnkas Jan, I'll try your solution.
 

-----Mensagem original-----
De: Jan.Materne@rzf.fin-nrw.de [mailto:Jan.Materne@rzf.fin-nrw.de] 
Enviada em: segunda-feira, 25 de outubro de 2004 03:49
Para: user@ant.apache.org
Assunto: AW: Convert to Ant

Defining the classpath is done with a <path>. Compiler is called via <javac>
and the program is run with <java>. So you´ll get something like that (not
tested):

<!-- cd oreilly-aop/example1 -->
oreilly-aop/example1/build.xml:
---8-<---------8-<---------8-<---------8-<---------8-<---------8-<------
<project default="run">
    <!-- for easier changing to better project structure -->
    <property name="src.dir"     value="."/>
    <property name="classes.dir" value="."/>

    <!-- export CLASSPATH=.;jboss-common.jar;jboss-aop.jar;javassist.jar -->
    <path id="classpath">
        <fileset dir="."
includes="jboss-common.jar,jboss-aop.jar,javassist.jar,"/>
        <fileset dir="${classes.dir}"/>
    </path>

    <!-- javac *.java -->
    <target name="compile">
        <javac srcdir="${src.dir}" destdir="${classes.dir}"
classpathref="classpath"/>
    </target>

    <!-- java
-Djava.system.class.loader=org.jboss.aop.standalone.SystemClassLoader -->
    <target name="run" depends="compile">
        <java classpathref="classpath">
            <sysproperty name="java.system.class.loader" 
 
value="org.jboss.aop.standalone.SystemClassLoader"/>
        </java>
    </target>
</project>
---8-<---------8-<---------8-<---------8-<---------8-<---------8-<------


Maybe you need to set >>fork="true"<< in the <java> task. 
AND: what should be started? You havent specified that. Neither the
classname (use the classname attribute for that) nor the jar file (jar
attribute).


Jan



> -----Ursprüngliche Nachricht-----
> Von: Kris Read [mailto:kris.read@gmail.com]
> Gesendet am: Montag, 25. Oktober 2004 08:34
> An: Ant Users List
> Betreff: Re: Convert to Ant
> 
> Hello, 
> 
> Ant is not a scripting language! 
> 
> Look in the Ant manual under the <java> and <javac> tasks. 
> 
> http://ant.apache.org
> 
> 
> 
> On Sun, 24 Oct 2004 09:31:22 -0300, André Dantas Rocha
> <ad-rocha@uol.com.br> wrote:
> > Hi,
> > 
> > I'm new in Ant and wold like to convert those lines to Ant 
> script. How can I
> > do it?
> > 
> > Thanks,
> > 
> > André
> > 
> > $ cd oreilly-aop/example1
> > $ export CLASSPATH=.;jboss-common.jar;jboss-aop.jar;javassist.jar
> > $ javac *.java
> > $ java 
> -Djava.system.class.loader=org.jboss.aop.standalone.SystemClassLoader
> > POJO
> > 
> >
> 
> ---------------------------------------------------------------------
> 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