With the antlib-syntax (#1) you define the xmlns you want to use.
If you want to load the jar from a custom location, you can use the taskdef.
http://ant.apache.org/manual/Types/antlib.html#loadFromInside

Jan

-----Ursprüngliche Nachricht-----
Von: Alan Snyder <contagiousarrow...@cbfiddle.com> 
Gesendet: Sonntag, 13. September 2020 18:46
An: user@ant.apache.org
Betreff: inline use of antlib with namespace?

Given that I have installed an external ant task library in an appropriate 
location, I know of two ways to make the tasks accessible in a build script:

1. Add an xmlns attribute to some element, such as

   <project ... xmlns:resolver="antlib:org.apache.maven.resolver.ant" ... > 

2. Add a taskdef inline, such as

  <taskdef resource="org/apache/maven/resolver/ant/antlib.xml"/> 

The first method puts the tasks in a separate namespace. The second method adds 
the tasks to the current namespace.

What I would like is a method that can be used inline (like #2) and also puts 
the tasks in a separate namespace (like #1).

Is there a way to do this?

My motivation is to use the inline definition in an imported script, so that I 
don’t have to repeat the definition in a large number of project specific 
scripts.



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@ant.apache.org For additional 
commands, e-mail: user-h...@ant.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@ant.apache.org
For additional commands, e-mail: user-h...@ant.apache.org

Reply via email to