ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lopez, William" <william.lo...@eds.com>
Subject RE: How to compile a java file?
Date Thu, 04 Sep 2003 13:52:56 GMT
Roy:

I'm somewhat new to Ant also and found the documentation more than adequate
to get me started....maybe you're just overwhelmed with the being new to
Java also...here is an snippet of a <javac> usage that then jars the result:

  <target name="compile.bo.domain">
     <javac destdir="${bo.build.dir}/Domain" listfiles="true" fork="yes">
        <src path="${src.base}/Domain" />
        <classpath refid="was.lib" />   
        <classpath refid="base.lib" />   
        <classpath refid="classpath.tempjar" />  
      </javac> 
     <jar jarfile="${app.module.dir}/Domain.jar"
basedir="${bo.build.dir}/Domain"/>
  </target>

-----Original Message-----
From: Roy Smith [mailto:roy@panix.com] 
Sent: Thursday, September 04, 2003 8:21 AM
To: Ant Users List
Cc: Roy Smith
Subject: Re: How to compile a java file?



On Thursday, September 4, 2003, at 08:54  AM, 
Jan.Materne@rzf.fin-nrw.de wrote:

> "Using Ant" is a good start, I think. For beginners the "Writing a
> Simple
> Buildfile"
> is the right point. It describes the buildfile syntax, provides links 
> to the
> task list
> and gives an example.
> And if you have a look at that example you see how to compile sources.

The problem is that I *did* read the example, and didn't get it.  It 
got lost in the noise.  As a first example, I think it's too 
complicated.  Maybe the problem is that I was still in the Make mindset 
of looking for a rule which explicitly showed how a class file depended 
on a java file?  In any case, I read right past the javac line and 
didn't "get" that this was what I was looking for.

Maybe start with Jan.Materne's trivial example of:

<project default="compile">
     <target name="compile">
         <javac srcdir="."/>
     </target>
</project>

and an explanation that this will complile all the java files in the 
current directory.   Then say, "And, a slightly more complex example 
showing how this might work in a real project", and give the example 
that's currently in the doc.


---------------------------------------------------------------------
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