Return-Path: Mailing-List: contact user-help@ant.apache.org; run by ezmlm Delivered-To: mailing list user@ant.apache.org Received: (qmail 24932 invoked from network); 14 Feb 2003 21:08:48 -0000 Received: from junior.lgc.com (134.132.72.99) by daedalus.apache.org with SMTP; 14 Feb 2003 21:08:48 -0000 Received: from lgchvw01.lgc.com (lgchvw01.lgc.com [134.132.93.107]) by junior.lgc.com (8.11.3/8.11.3) with SMTP id h1EL7nB19186 for ; Fri, 14 Feb 2003 15:07:49 -0600 (CST) Received: from 134.132.93.152 by lgchvw01.lgc.com (InterScan E-Mail VirusWall NT); Fri, 14 Feb 2003 15:08:52 -0600 Received: by lgchexchbh.ad.lgc.com with Internet Mail Service (5.5.2653.19) id <1C73F66X>; Fri, 14 Feb 2003 15:08:52 -0600 Message-ID: From: Dominique Devienne To: "'Ant Users List'" Subject: RE: porting over my make build process ant Date: Fri, 14 Feb 2003 15:08:51 -0600 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N It depends what you mean by projects... Many new comers to Ant from a Make background what to put a build.xml in every directory of the project. Ant works best by having a single build.xml at the root of the project, which builds all the Java sources in the src/ or src/java/ directory, outputting the classes in build/classes, for example. Many Ant task are designed to recurse directories automatically (like will compile all .java files in any subdir of src/) Ant 1.5.1 (last official release) doesn't do inclusion too well (see the FAQ for XML entity includes), and unless you really have many different projects to build, you want to learn more about Ant before using it. Write an Ant build for one project (start with the one which as the least dependencies on code/classes other than its own), then a second one, then you can start refactoring them to use XML entity includes (or use Ant CVS HEAD which has a new task). Things that would help to guide you would be you directory layout, whether you have Java sources only, or C/C++/else type of sources, if you generate code or files as part of the build process (like converting IDL files, etc...). I hope this helps, --DD -----Original Message----- From: Danny Zapata [mailto:dzapata@bea.com] Sent: Friday, February 14, 2003 2:36 PM To: 'ant-user@jakarta.apache.org' Subject: porting over my make build process ant I wanted to port our current build process over to ant and I have been struggling with a couple of things. This is the current build process: For every project, the makefile 1st sources a config file, which contains a bunch of common variables that are used for the build, then lists some files to be compiled, then calls a makefile which contains rules common to all projects. The reasoning for using a common rules file is that the same rules don't have to be repeated in every project makefile, the project makefile only needs to include the rules file. That way the project makefile can only contain the files to be built. The makefiles are included using the include command within the project makefile. In trying to implement this in ant, I am generating a properties file which is to be included in the projects build.xml file. That will suit my needs (for now) for the config part. For the common rules, I tried to include a rules.xml file at the end of the project build.xml, using Here is what my original makefile looks like (edited for space): include ${EV_TROOT}/config/java_config.mk srcdirs:=${EV_TROOT}/src/idl idls:= \ common \ db \ AuthenticationService include $(EV_TROOT)/config/java_rules.mk This is what the build.xml file looks like now: So the major problem is that I can't properly include my rules file inside my project file so I won't have to write any rules in the project file and be able to reference the rules in jrules.xml inside my projects' build.xml file. Any help would be greatly appreciated. Thanks, Danny --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org