Return-Path: Delivered-To: apmail-ant-dev-archive@www.apache.org Received: (qmail 18156 invoked from network); 16 Oct 2003 14:56:35 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 16 Oct 2003 14:56:35 -0000 Received: (qmail 89277 invoked by uid 500); 16 Oct 2003 14:56:26 -0000 Delivered-To: apmail-ant-dev-archive@ant.apache.org Received: (qmail 89241 invoked by uid 500); 16 Oct 2003 14:56:26 -0000 Mailing-List: contact dev-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Developers List" Reply-To: "Ant Developers List" Delivered-To: mailing list dev@ant.apache.org Received: (qmail 89221 invoked from network); 16 Oct 2003 14:56:25 -0000 Received: from unknown (HELO corvil.com) (213.94.219.177) by daedalus.apache.org with SMTP; 16 Oct 2003 14:56:25 -0000 Received: from preilly.local.corvil.com (preilly.local.corvil.com [172.18.1.173]) by corvil.com (8.12.9/8.12.5) with ESMTP id h9GEuQd8098027 for ; Thu, 16 Oct 2003 15:56:26 +0100 (IST) (envelope-from peter.reilly@corvil.com) From: peter reilly Organization: corvil To: Ant Developers List Subject: Re: [Ant 1.6beta1] More feedback about import Date: Thu, 16 Oct 2003 15:56:58 +0100 User-Agent: KMail/1.5 References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200310161556.58673.peter.reilly@corvil.com> X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N I suppose one add a required attribute. One could also use a macrodef which nearly works. The only problem with this is that the resolution of file for available is relative to base dir and the resolution of file for import is relative to the file that contains the import task (or in this case the conditional-import task). Peter On Thursday 16 October 2003 15:23, Dominique Devienne wrote: > Peter, and al, > > I'd like to have a new 'required' attribute that I could set to > false to simply ignore an imported build file not found. Before I get > flamed, here's the use case: rich and flexible user-configuration of the > build. > > Currently, each project loads a properties file from > users/${user.name}/${ant.project.name}-build.properties. This allows to set > various properties of course, but only properties used by the build file > are useful. It's not easy to define paths, etc... Of course, such a > user-specific properties is optional, and Ant merrily ignores that fact. > > I'd like to change this pattern so that now each project imports an > optional users/${user.name}/${ant.project.name}-build.xml file, which can > thus contain properties, but also any tasks or even additional targets > specific to a user (for example as a VIM user, a tasks that runs ctags on > the project). > > With this pattern, and the new , a user can even configure task > attributes which have not been defaulted and used thru a property > (something I complained about, and that addresses quite > nicely). > > Lastly, but quite importantly for us with platform-specific issues related > to native code, such an imported user-specific XML file can use conditions > from Ant-Contrib to conditionally set properties, something one had to > resort to emulate thru loading this or that file, which was quite > cumbersome. > > I truly hope the benefits that such a use case presents will be enough for > this minor additional to make it to Ant 1.6. > > Thanks, --DD > > > C:\oss\org_apache\antx\import16>ant -version > Apache Ant version 1.6beta compiled on September 30 2003 > C:\oss\org_apache\antx\import16>ant -f import-not-found.xml > Buildfile: import-not-found.xml > > BUILD FAILED > C:\oss\org_apache\antx\import16\import-not-found.xml:5: Cannot find > does/not/exist.xml imported from > C:\oss\org_apache\antx\import16\import-not-found.xml > > Total time: 1 second > C:\oss\org_apache\antx\import16>type import-not-found.xml > > > > > > > > > C:\oss\org_apache\antx\import16> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org > For additional commands, e-mail: dev-help@ant.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org For additional commands, e-mail: dev-help@ant.apache.org