aspose file tools*
The moose likes Ant, Maven and Other Build Tools and the fly likes Using ant to over multiple packages Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Using ant to over multiple packages" Watch "Using ant to over multiple packages" New topic
Author

Using ant to over multiple packages

Tony Evans
Ranch Hand

Joined: Jun 29, 2002
Posts: 573
Is there a ant guide or tutorial to show how to use ant to complile multiple packages i.e

If I have
src/revision/testA/test1.java
src/revision/testA/test2.java
src/revision/testB/test1.java
src/revision/testB/test2.java
src/revision/testC/test1.java
src/revision/testC/test2.java

and

classes/revision/testA/
classes/revision/testA/
classes/revision/testB/
classes/revision/testB/
classes/revision/testC/
classes/revision/testC/

I want to compile the java classes into thwere corresponding classes directory.

I have tried

<?xml version="1.0" encoding="ISO-8859-1"?>
<project name="revision" basedir=".">

<property name="src.dir" value="src"/>
<property name="classes.dir" value="classes"/>

<target name="compile">
<javac scrdir="${src.dir}/*" destdir="${classes.dir}/*"/>
</target>
</project>

which failed.

Thanks for any help

Tony
Tony Evans
Ranch Hand

Joined: Jun 29, 2002
Posts: 573
Sorted the problem out:

<?xml version="1.0"?>
<project name="revision" default="all" basedir=".">

<target name="init">
<property name="dirsbase" value="${basedir}/WEB-INF"/>
<property name="srcdir" value="${dirsbase}/src"/>
<property name="classdir" value="${dirsbase}/classes"/>
</target>

<!-- Main target -->
<target name="all" depends="init,build"/>

<target name="build" depends="init">
<javac srcdir="${srcdir}" destdir="${classdir}" debug="true" includes="**/*.java" />
</target>
</project>

Tony
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Using ant to over multiple packages