Re: Getting task class *only* from specified path

2010-11-01 Thread David Weintraub
On Mon, Nov 1, 2010 at 1:07 PM, Peter Reilly wrote: > That will not work. > The jars in $ant.home/lib or ~/.ant/lib will > be in front in the classloader. That's true even if I specify the exact jarfile I want to use in my classpath? I never realized that. What is the purpose of specifying a cla

Re: Getting task class *only* from specified path

2010-11-01 Thread Stephen Connolly
The maven-shade-plugin (yes, yes, peter, I know it's maven and this is the ANT list) is used to take jar files and reprocess them. You can relocate packages, as well as mask class names. The main use-cases are: 1. Bundling your dependencies to produce an uber jar which will be safe in the presence

Re: Getting task class *only* from specified path

2010-11-01 Thread Peter Reilly
You may be able to use from http://enitsys.sourceforge.net/ant-classloadertask/ but with the same class in two places in the classpath, you will have problems. Peter On Mon, Nov 1, 2010 at 11:46 PM, Peter Reilly wrote: > It would be good to understand one word in three of that ;-) > Peter

Re: Getting task class *only* from specified path

2010-11-01 Thread Peter Reilly
It would be good to understand one word in three of that ;-) Peter On Mon, Nov 1, 2010 at 9:18 PM, Stephen Connolly wrote: > You could shade your ant task using a shading tool, eg maven-shade-plugin > then it would be in a different package and depend on classes in a different > package also (th

Re: Getting task class *only* from specified path

2010-11-01 Thread Stephen Connolly
You could shade your ant task using a shading tool, eg maven-shade-plugin then it would be in a different package and depend on classes in a different package also (there may be non-maven shading tools for the maven averse ;-) ) On 1 Nov 2010 17:07, "Peter Reilly" wrote: That will not work. The

Re: Getting task class *only* from specified path

2010-11-01 Thread Peter Reilly
That will not work. The jars in $ant.home/lib or ~/.ant/lib will be in front in the classloader. Peter On Mon, Nov 1, 2010 at 4:23 PM, David Weintraub wrote: > When you use a , you can specify the classpath to use to > point to the jarfile. ut the jarfile used by inside your > project, and the

Re: UNS: Re: Getting task class *only* from specified path

2010-11-01 Thread Andreas Krey
On Mon, 01 Nov 2010 12:23:48 +, David Weintraub wrote: > When you use a , you can specify the classpath to use to > point to the jarfile. ut the jarfile used by inside your > project, and then set classpath to load that jarfile. This is what I do (and what I said to do). Unfortunately, ant se

Re: Getting task class *only* from specified path

2010-11-01 Thread David Weintraub
When you use a , you can specify the classpath to use to point to the jarfile. ut the jarfile used by inside your project, and then set classpath to load that jarfile. For example, Put the jarfile in "${basedir}/antlib" and then define your taskdef like this: If you use a ve

Getting task class *only* from specified path

2010-10-31 Thread Andreas Krey
Question: I need a user task; I do load it via explicit class path in the taskdef. Unfortunately I need to use that version, but users may have older ones in their .ant/lib. How can I keep ant (1.7) from loading that version? Andreas ---