ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <dona...@apache.org>
Subject Re: Composite tasks and symlinks?
Date Sun, 25 Mar 2001 16:36:53 GMT
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).

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 ;)

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). 

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 ;)

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

>	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 ... ;)

>	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 />
Cheers,

Pete

*-----------------------------------------------------*
| "Faced with the choice between changing one's mind, |
| and proving that there is no need to do so - almost |
| everyone gets busy on the proof."                   |
|              - John Kenneth Galbraith               |
*-----------------------------------------------------*


Mime
View raw message