Bug 44661

Summary: Task 'get' should should allow alternative paths.
Product: Ant Reporter: Gustav Weber <gustav_weber75>
Component: Core tasksAssignee: Ant Notifications List <notifications>
Status: NEW ---    
Severity: enhancement    
Priority: P2    
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   

Description Gustav Weber 2008-03-23 06:08:48 UTC
Task 'get' should allow alternative paths (or sources of download):
Right now there's only a 'src' attribute, but the most useed case of this task is to download jar libraries from remote servers. If the jar is not available from one server(or the server is down), it might be available from another, but this is very complicated to make right now with ANT (and makes the build.xml complicated and ugly).
The simplest solution would to support "alternative" download paths, so that when one download fails (for a specific jar) than to use next from the list of alternatives.
Comment 1 Steve Loughran 2008-03-25 03:50:32 UTC
I dont know what the most popular use of <get> is; certainly in my projects its probing webapps I've just deployed.


Looking at this and your other list of requirements, I can see you are trying to use <get> for library management. Can I point you at our affiliate project, Ivy, that handles all this for you? 
Comment 2 Gustav Weber 2008-04-17 05:50:02 UTC
> Looking at this and your other list of requirements, I can see you are trying
> to use <get> for library management. 
Yes, but a very very simple management, like it's done in many open source projects like:
FreeMarker:
http://freemarker.svn.sourceforge.net/viewvc/freemarker/trunk/freemarker/build.xml
or even better
Click Frameowrk:
http://click.sourceforge.net/docs/building.html#ant-targets
(see get-deps task)


> Can I point you at our affiliate project,
> Ivy, that handles all this for you? 
I'm aware of Ivy(and used it) but I think it's an overkill for most simple projects(and one could have used Maven as well), and for that very simple reason ANT would just do it.

I also don't think this would be any duplication with IVY since Ivy would handle complex situations. 

For very simple projects however were only a few jars are present, the tasks I descibed would solve the problems and would pose no learning barrier to the (new)users (exactly the main argument of ANT over maven).

Thank you,

Gustav.