Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 28396 invoked from network); 18 May 2005 08:09:49 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 18 May 2005 08:09:49 -0000 Received: (qmail 9142 invoked by uid 500); 18 May 2005 08:09:15 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 9055 invoked by uid 500); 18 May 2005 08:09:14 -0000 Mailing-List: contact user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list user@ant.apache.org Received: (qmail 8979 invoked by uid 99); 18 May 2005 08:09:13 -0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS X-Spam-Check-By: apache.org Received-SPF: neutral (hermes.apache.org: local policy) Received: from moutng.kundenserver.de (HELO moutng.kundenserver.de) (212.227.126.171) by apache.org (qpsmtpd/0.28) with ESMTP; Wed, 18 May 2005 01:09:08 -0700 Received: from p54B11886.dip0.t-ipconnect.de [84.177.24.134] (helo=enitsysmob0001) by mrelayeu.kundenserver.de with ESMTP (Nemesis), id 0ML2Dk-1DYJbQ3bU1-0001eX; Wed, 18 May 2005 10:08:28 +0200 Reply-To: From: "Rainer Noack" To: "'Ant Users List'" Subject: RE: nontrivial dependencies Date: Wed, 18 May 2005 10:08:45 +0200 Organization: Rainer Noack Message-ID: <001401c55b80$d0e42000$037ba8c0@enitsysmob0001> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.6626 Importance: Normal In-Reply-To: X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527 X-Provags-ID: kundenserver.de abuse@kundenserver.de login:a278c2346575d530eb0d775cc9a340ba X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hi Michael, just a hint: what's about 's if/unless attributes... BTW: How would you handle this in eclipse? Cheers Rainer > -----Original Message----- > From: Michael Cepek [mailto:michael.cepek@spanlink.com] > Sent: Tuesday, May 17, 2005 11:17 PM > To: user@ant.apache.org > Subject: nontrivial dependencies > > > I've been trying for a very long time now (many man-days) to > create Ant build scripts to handle our new corporate project. > > I've been using Ant for over 3 years, and programming > professionally for over 25 years. > > Despite all that, I cannot seem to get Ant to do what we need > on this project. I am becoming extremely frustrated and > disillusioned with Ant as a build tool. Yet in my heart I > feel like there is an elegant solution. > > Perhaps some gurus can enlighten me? > _ _ _ _ _ _ _ > > Our project has a pretty basic layout: > > dev/foo/build.xml > dev/foo/config/runtime.properties > dev/foo/config/log4j.properties > dev/foo/lib/ > dev/foo/log/ > dev/foo/src/cpp/... > dev/foo/src/java/com/company/foo/admin/ > dev/foo/src/java/com/company/foo/db/ > dev/foo/src/java/com/company/foo/controller/ > dev/foo/src/java/com/company/foo/util/ > > Note the (as-yet undefined) src/cpp/ subtree for C++ code. > > Here is a sample layout for one of the java package directories: > > dev/foo/src/java/com/company/foo/util/build.xml > dev/foo/src/java/com/company/foo/util/DbUtils.java > dev/foo/src/java/com/company/foo/util/StringUtils.java > dev/foo/src/java/com/company/foo/util/classes/ > dev/foo/src/java/com/company/foo/util/javadoc/ > dev/foo/src/java/com/company/foo/util/test/testAll > dev/foo/src/java/com/company/foo/util/test/testDbUtils.java > dev/foo/src/java/com/company/foo/util/test/testStringUtils.java > > Our team needs to be able to use the following Ant targets > from within ANY of the top-level java package directories > (xxx = one of these package names: admin, db, controller, and util): > > compile - compile .java into .class files which are put into > company/foo/xxx/classes/ for package xxx only. > > build - create lib/xxx.jar (containing non-test files) and > create lib/xxx-test.jar (containint test-only files); > depends on compile. > > test - run unit tests for package xxx; depends on build. > > javadoc - put javadoc for package xxx only into the > company/foo/xxx/javadoc directory. > > clean - delete buildable files for xxx only. > > We also need these targets: build-all, test-all, > javadoc-all, and clean-all. These would build everything for > both Java and C++. > > We need to use these targest both from the command-line AND > from within our IDE (currently Eclipse). A command-line example: > > $ cd dev/foo/src/java/com/company/foo/util > $ ant clean-all test > > The above would first delete all buildable .jar, .class and > .dll files from the whole project. Then just the "util" > package would be compiled, built, and unit-tested (we are > using JUnit). > > We would prefer to rely on Ant's Core Tasks only, if at all possible. > > The dev/foo/build.xml file uses file="config/runtime.properties"> to bring in the common > properties definitions like: > > SRCDIR=${basedir}/${ant.project.name} > CLASSES=classes > LIB=lib > CONFIG=config > LOG=log > JAVADOC_FTP_HOST=192.168.12.34 > JAVADOC_FTP_DIR=html/foo/api > JAVADOC_FTP_USR=anonymous > JAVADOC_FTP_PWD=none > JUNIT_RUNNER=junit.textui.TestRunner > > Finally, we need each package to first compile and/or build > any packages on which it depends. > > [Doesn't everyone need to do this?] > _ _ _ _ _ _ _ > > I have tried many combinations of , , , > , , and . > > I have hit brick walls every time (not Ant bugs). > > For example: To use Ant from the command line in any package > directory, there needs to be a build.xml file in each. > Ideally these would be as small as possible to minimize Ant > script code replication, ease maintenance, and simpify the > creation of new packages. I tried many ideas along the lines > of Joe Schmetzer's post on 9-May-2005 to this list. Nothing > has worked out. > > My favorite aspect of Joe's solution was having each simply > "name itself" using the attribute, and > then rely on ${ant.project.name} to know what the originating > package was. Each of those package-level Ant scripts was > perfectly minimal: > > default="usage" basedir="../../../../../.."> > > > > Anyway... > > One of the key issues is: how to handle the dependencies? > > At the moment I'm out of time to write more (my carpool is > here). This post is probably plenty long anyway. > > Has anyone put together solutions like this? Care to share > some working scripts? Any other suggestions or > recommendations? Thank you. > > > --------------------------------------------------------------------- > 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