ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Seth Landsman <>
Subject Re: Composite tasks and symlinks?
Date Sun, 25 Mar 2001 17:27:36 GMT
On Mon, Mar 26, 2001 at 02:36:53AM +1000, Peter Donald wrote:
> At 10:56  25/3/01 -0500, Seth Landsman wrote:
> >	So, I wrote this task to (a) search for existing jar files, (b)
> >download them if they don't exist, (c) set up a symlink farm pointing to
> >all the various jars and (d) set a property to point to the jar.
> Sounds kewl - very similar to some tasks that were talked about for CJAN
> (Complete Java Archive Network). One question though - why do you need
> stage (c) when you have (4).

	Well, in an ideal setting I wouldn't have to.  However, I still
need to integrate with my existing build system.  Also, the symlink farm
lets me point to specific versions, without having the user need to worry
about it.

	(BTW, I've been thinking about a CJAN-like system for a while.  I'd
be interested in working on such a system.)

> The cjan task I was thinking about was essentially
> <cjan-get library="mycategory/mylib" version="1.2.3"/>
> <cjan-locate library="mycategory/mylib" property="mylib.jar" />
> So this would check current jar for mylib and make sure it was of correct
> version etc. The search for the jar would go
> * system-wide jar repository
> * user-wide jar repository
> * workspace-wide jar repository
> * project-wide jar repository
> The system-wide and user-wide repositories would usually be system specific
> (ie /usr/local/java on debian/linux, /WinNT/jars on winNT etc). Workspace
> is something I was kicking around ideas for but couldn't come up with a
> good answer while project-wide is self explanatory ;)

	project-wide and workspace-wide looks useful to me.  My framework
could be considered a workspace, with the user inheriting some specific 
settings based on the fact that they are using the framework.

> If the check failed (ie wasn't up to date or was missing) a new jar would
> be downloaded and placed in project-wide repository (or alternatively
> another if indicated my task attribute). 

	Right.  I need to figure out how to do an up-to-date check for
downloading my jars.

> The lookup and download of components could have been
> centralized/decentralized depending on how we decide to implement CJAN.
> Eventually I would like to see something like
> <javac ....>
> ...
>   <library name="mycategory/mylib" version="1.2.3"/>
> ...
> </javac>
> However I think that is some time away ;)

	This makes sense to me.

> I would like to have a look at your task as it is. It would definetly fill
> needs I have seen ;)

	Okay.  I need to give it some clean up, but I'll post the file later

> >	In the ant-dev mail archives, I see a short discussion about
> >an <aliasdef> tag or composite <taskdef> tags, but no apparent resolution.
> >Has this feature been implemented?  Given the ongoing Ant 2.0 discussion,
> >would a patch like this be interesting?  
> It hasn't been implemented and we aren't really sure how we are going to
> implement it. We don't really want to change too much of the 1.1 semantics
> at the moment in case the changes do not survive in ant2.x. However if it
> was done in an good way ... ;)

	I'll give it a shot.  What types of core changes are going into
ant2?  I haven't seen a document specifying that.  Or is that still under

> >	Also, an aside question.  Is there a decent way to make a unix symlink
> >via ant?  I wonder if there is a demand for a set of unix-ish tasks?  They
> >won't be cross platform (meaning unix -> windows), but some people might not
> >care.
> we already have chmod/chgrp tasks so another symlink won't hurt. Until then
> though it may be useful to instead use <exec />

	I wonder if there should be a seperate package for unix-specific
tasks?  org.apache.ant.task.unix.symlink, for example.

	I think a symlink task makes more sense than using <exec>, it'll
allow us to specify arguments and better deal with failures.


View raw message