You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Stefan Bodewig <bo...@apache.org> on 2008/10/30 13:01:13 UTC
Re: ProjectHelper
On Wed, 29 Oct 2008, Matt Benson <gu...@yahoo.com> wrote:
--- Stefan Bodewig <bo...@apache.org> wrote:
> Okay, what say we move the Project instantiation to
> ProjectHelper then, so that custom ProjectHelpers can
> influence the Project class used if needed?
we probably can do so without breaking existing code.
> This still doesn't alleviate the problem that EasyAnt will need a
> little custom configuration to install the ProjectHelper and,
> probably, an Executor.
As for the ProjectHelper, there is a services facility, so all it
takes is putting the correct services entry into META-INF/services
(JavaFront does so) and keeping the jar in your classpath.
I haven't checked whether we do the same for executors, we probably
should.
> But these are both handled with system properties, so this could
> either be done with hook scripts or an EasyAnt Main class that calls
> Ant Main after setting the necessary properties.
The wrapper looks like the least intrusive approach. Users then have
to consciously use it, with the services facility they may end up
using EasyAnt's extended versions just because it happens to live on
the CLASSPATH.
Stefan
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
Re: ProjectHelper
Posted by Stefan Bodewig <bo...@apache.org>.
On Thu, 30 Oct 2008, Jeffrey E. Care <ca...@us.ibm.com> wrote:
> For my DiagnosticsProvider/VersionProvider patch I wrote a
> ServiceLoader class that mimics the API of the supported
> ServiceLoader class that comes with JDK 6. I'm still trying to get
> that patch cleared through IBM legal though, so I have no idea when
> I would be able to complete the contribution.
It would be pretty straightforward to pull the code from
ProjectHelper.getProjectHelper and make it a bit more generic. It
looks as if the code was stolen from Xerces. No need to jump through
any legal hoops IMHO.
Stefan
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
Re: ProjectHelper
Posted by Jeffrey E Care <ca...@us.ibm.com>.
The services mechanism was added to the JAR spec in JDK 1.3 or 1.4; Sun
didn't add public classes to use services until JDK 6. Before JDK 6 you
either had to use sun.misc.Service or write your own loader; IIRC there
was also a loader available with one of the optional JDK extensions
(something to do with audio or graphics) that we could use (it wasn't
actually related to the function of the library that it was provided
with).
For my DiagnosticsProvider/VersionProvider patch I wrote a ServiceLoader
class that mimics the API of the supported ServiceLoader class that comes
with JDK 6. I'm still trying to get that patch cleared through IBM legal
though, so I have no idea when I would be able to complete the
contribution.
____________________________________________________________________________________________
Jeffrey E. (Jeff) Care
carej@us.ibm.com
IBM WebSphere Application Server
WAS Release Engineering
From:
"Xavier Hanin" <xa...@gmail.com>
To:
"Ant Developers List" <de...@ant.apache.org>
Date:
10/30/2008 09:02 AM
Subject:
Re: ProjectHelper
On Thu, Oct 30, 2008 at 1:01 PM, Stefan Bodewig <bo...@apache.org>
wrote:
> On Wed, 29 Oct 2008, Matt Benson <gu...@yahoo.com> wrote:
>
> --- Stefan Bodewig <bo...@apache.org> wrote:
>
> > Okay, what say we move the Project instantiation to
> > ProjectHelper then, so that custom ProjectHelpers can
> > influence the Project class used if needed?
>
> we probably can do so without breaking existing code.
>
> > This still doesn't alleviate the problem that EasyAnt will need a
> > little custom configuration to install the ProjectHelper and,
> > probably, an Executor.
>
> As for the ProjectHelper, there is a services facility, so all it
> takes is putting the correct services entry into META-INF/services
> (JavaFront does so) and keeping the jar in your classpath.
AFAIK this only works with Java 6.
Xavier
Re: ProjectHelper
Posted by Xavier Hanin <xa...@gmail.com>.
On Thu, Oct 30, 2008 at 2:12 PM, Stefan Bodewig <bo...@apache.org> wrote:
> On Thu, 30 Oct 2008, Xavier Hanin <xa...@gmail.com> wrote:
>
> > On Thu, Oct 30, 2008 at 1:01 PM, Stefan Bodewig <bo...@apache.org>
> wrote:
> >
> > > As for the ProjectHelper, there is a services facility, so all it
> > > takes is putting the correct services entry into META-INF/services
> > > (JavaFront does so) and keeping the jar in your classpath.
> >
> > AFAIK this only works with Java 6.
>
> We've implemented it ourselves in ProjectHelper, works like a charm in
> Java5 (which I used for my examples and only because JavaFront relies
> on annotations) and probably any version of Java supported by Ant.
Ok, nice to know yet another Ant feature :-).
Xavier
>
>
> Stefan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> For additional commands, e-mail: dev-help@ant.apache.org
>
>
--
Xavier Hanin - 4SH France
BordeauxJUG co leader - http://www.bordeauxjug.org/
Blogger - http://xhab.blogspot.com/
Apache Ivy Creator - http://ant.apache.org/ivy/
Re: ProjectHelper
Posted by Stefan Bodewig <bo...@apache.org>.
On Thu, 30 Oct 2008, Xavier Hanin <xa...@gmail.com> wrote:
> On Thu, Oct 30, 2008 at 1:01 PM, Stefan Bodewig <bo...@apache.org> wrote:
>
> > As for the ProjectHelper, there is a services facility, so all it
> > takes is putting the correct services entry into META-INF/services
> > (JavaFront does so) and keeping the jar in your classpath.
>
> AFAIK this only works with Java 6.
We've implemented it ourselves in ProjectHelper, works like a charm in
Java5 (which I used for my examples and only because JavaFront relies
on annotations) and probably any version of Java supported by Ant.
Stefan
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
Re: ProjectHelper
Posted by Xavier Hanin <xa...@gmail.com>.
On Thu, Oct 30, 2008 at 1:01 PM, Stefan Bodewig <bo...@apache.org> wrote:
> On Wed, 29 Oct 2008, Matt Benson <gu...@yahoo.com> wrote:
>
> --- Stefan Bodewig <bo...@apache.org> wrote:
>
> > Okay, what say we move the Project instantiation to
> > ProjectHelper then, so that custom ProjectHelpers can
> > influence the Project class used if needed?
>
> we probably can do so without breaking existing code.
>
> > This still doesn't alleviate the problem that EasyAnt will need a
> > little custom configuration to install the ProjectHelper and,
> > probably, an Executor.
>
> As for the ProjectHelper, there is a services facility, so all it
> takes is putting the correct services entry into META-INF/services
> (JavaFront does so) and keeping the jar in your classpath.
AFAIK this only works with Java 6.
Xavier