You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Steve Loughran <st...@apache.org> on 2008/09/01 13:31:56 UTC

Re: Allowing antlibs to contribute diagnostics & version info

Jeffrey E Care wrote:
>> I haven't looked at the code in question, but I would
>> think the hardest part of this whole effort would be
>> providing the means for Ant to look up antlib version
>> info.  I'm actually fairly enthusiastic about using
>> the combination of existing arguments, mostly just
>> because of the number of requests I've seen for the
>> proliferation of arguments to Ant.  Surely one of the
>> existing committers could hook that up if you don't
>> want to tackle that part, Jeff... again, the rest is
>> the tricky part IMHO!
> 
> I'm using META-INF/services from the JAR spec, so the discovery is 
> actually pretty easy so long as the Antlibs are available via the 
> classloader that oata.launch.Launcher configures. Note that this approach 
> does not need a project: it will discover anything that's available from 
> the classloader. 
> 
> I already have a similar function working in the extensions we use to 
> build WebSphere, so I've just been adapting that. I had to reverse 
> engineer the ServiceLoader class from JDK 6, since I know that I can't 
> depend on a JDK 6 runtime. I could have used sun.misc.Service, but I 
> figured that would be problematic on opensource JDKs.
> 

You could also run through all antlibs defined in the root of the 
project, list which are there and diagnose them. Since they are the ones 
that matter if they are missing...

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Re: Allowing antlibs to contribute diagnostics & version info

Posted by Jeffrey E Care <ca...@us.ibm.com>.
Stefan Bodewig <bo...@apache.org> wrote on 09/01/2008 11:00:55 AM:

> On Mon, 01 Sep 2008, Steve Loughran <st...@apache.org> wrote:
> 
> > You could also run through all antlibs defined in the root of the
> > project, list which are there and diagnose them. Since they are the
> > ones that matter if they are missing...
> 
> I think there is a good case for a "ant -version -v" listing all
> antlibs found in ANT_HOME/lib without having any build file at all.

Right: I want this to work even if there's no build.xml anywhere in sight.

Think of it as "what's available for me to use?" instead of "what have I 
already declared that I'm using?".

Re: Allowing antlibs to contribute diagnostics & version info

Posted by Stefan Bodewig <bo...@apache.org>.
On Mon, 01 Sep 2008, Steve Loughran <st...@apache.org> wrote:

> You could also run through all antlibs defined in the root of the
> project, list which are there and diagnose them. Since they are the
> ones that matter if they are missing...

I think there is a good case for a "ant -version -v" listing all
antlibs found in ANT_HOME/lib without having any build file at all.

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org