Return-Path: Delivered-To: apmail-jakarta-ant-dev-archive@apache.org Received: (qmail 57461 invoked from network); 5 Jan 2003 16:17:47 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 5 Jan 2003 16:17:47 -0000 Received: (qmail 12251 invoked by uid 97); 5 Jan 2003 16:19:02 -0000 Delivered-To: qmlist-jakarta-archive-ant-dev@jakarta.apache.org Received: (qmail 12235 invoked by uid 97); 5 Jan 2003 16:19:02 -0000 Mailing-List: contact ant-dev-help@jakarta.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 ant-dev@jakarta.apache.org Received: (qmail 12223 invoked by uid 98); 5 Jan 2003 16:19:02 -0000 X-Antivirus: nagoya (v4218 created Aug 14 2002) X-Injected-Via-Gmane: http://gmane.org/ To: ant-dev@jakarta.apache.org Path: not-for-mail From: Costin Manolache Subject: Re: Antlib... when? Date: Sun, 05 Jan 2003 08:08:54 -0800 Lines: 100 Message-ID: References: <3E16E83C.9040506@apache.org> <3E178DF0.1020200@chalko.com> <3E1804D2.8010203@apache.org> <3E185692.2090003@apache.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Complaints-To: usenet@main.gmane.org User-Agent: KNode/0.7.1 Sender: news X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Nicola Ken Barozzi wrote: >> Nicola - you can just use taskdef with a resource parameter and define >> all the cents at once. > > Yup, but you still have to do it. > > I want to simply make the user add a tag in the buildfile, > but since it's not loaded, it cannot load others the way you say... > catch22. ... Sounds simple enough. Or: One line (or ns ) describing the fact that the build file is using centipede is not too much to ask. BTW, centipede can define aditional antlibs if it wants ( I think it would be better to require the user to declare all libs it uses - like in XSTL or JSP - but it's your choice on what centipede does ). > I need something to load automatically, or I'll have something like this: > > > > > I have now made a Centipede task, but the best I can do is: > > > > > After that I can import the "cents", but only after that. > > http://cvs.apache.org/viewcvs/jakarta-poi/centibuild.xml?rev=HEAD&content-type=text/vnd.viewcvs-markup > > >> Conor has a very good point - if you look at a buildfile you should >> be able to tell what antlibs it is using. > > If they are non-core I agree. But let me define what is core. > As Java can import anything and not use "namespace" on every class name > with explicit import. But you still need to do an explicit import org.apache.tools.ant.*; The only thing that is imported by default is java.lang - which is quite small. Antlib can do the same - either or with xmlns. >> If the build file doesn't specify what libs it needs - how could >> you guess ? ( i.e. if a build is written under the assumption that >> the antlibs exist already in ant/lib and no reference to the >> name of the antlibs is made ). > > You are right, but I need to init the system. These "taglibs", that for > us are cents, are downloaded by a task that we need to define. It would > be nicer if it were already there. Not really necessary, but much nicer. You just need to declare that you use centipede and add one extra line ( or ). Maybe nicer without that - but not cleaner. I see no problem with including an downloader in antlib - as Conor sugested. But that's a different issue. > I have worked with XML a lot, in Cocoon and now Forrest. > Namespaces are ugly, hard to declare and make the xml files unreadable. > > Ant buildfiles are nice also because they don't use namespaces. Please, > let's resort to them only if *really* necessary. I agree. If you don't have name conflicts - you can just use If you have conflicts - or just like the ns syntax - you use it. The best of both worlds. > You don't normally use full packagename of the classes in your java > files, don't you? You do need to do the "import package.*". For ant we can have 2 choices: either in xmlns or an explicit antlib with the URL. Costin -- To unsubscribe, e-mail: For additional commands, e-mail: