IntelliJ Java IDE
The moose likes Ant, Maven and Other Build Tools and the fly likes Compile dependencies Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of Practical Unit Testing with TestNG and Mockito this week in the Testing forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Reply Bookmark "Compile dependencies " Watch "Compile dependencies " New topic
Author

Compile dependencies

Mihai Radulescu
Ranch Hand

Joined: Sep 18, 2003
Posts: 912
Hallo

I have a project with a lot of modules.Each module has its own source directory.The whole project is compiled with the same destination (the calsses are strored in the same dir)
Something like :

I use for the module (src) list a dirSet.The same dir set I use it like sourcepath(because between modules are some dependecies).

This architecture is functional.Thare are also other way (may be more simple ) to compile a project with sources in different dirs ?

[ edited to preserve formatting using the [code] and [/code] UBB tags -ds ]
[ July 22, 2004: Message edited by: Dirk Schreckmann ]

SCJP, SCJD, SCWCD
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
I'm not certain I've a clear idea of the ant script you're using now. Could you post an example (or a real) script?
[ July 22, 2004: Message edited by: Dirk Schreckmann ]

[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
Mihai Radulescu
Ranch Hand

Joined: Sep 18, 2003
Posts: 912
Ok , here is the script

<path id="product.classpath">
<pathelement
.........
</path>


<path id="dir.modules.spurces">
<dirset dir="/modulesRoot" includes="${product.dir.modules}"/>
</path>

<target description="It compiles the sources" name="product.compile">
<mkdir dir="${product.dir.home}/${product.dir.classes}"/>
<javac deprecation="true" destdir="${dir.classes}">
<classpath refid="product.classpath"/>
<src refid="dir.modules.spurces"/>
</javac>
</target>
 
 
subject: Compile dependencies
 
Threads others viewed
Passed with 91%
91%
cleared wcd - 91%
Passed SCWCD 91%
passed with 91%
IntelliJ Java IDE