git.net

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Java modules as Ant resources


Den lör 16 juni 2018 kl 17:47 skrev Stefan Bodewig <bodewig@xxxxxxxxxx>:

> On 2018-06-16, Gintautas Grigelionis wrote:
>
> > if services would become a new mechanism for adding tasks, modules
> > would be of help by providing an API to discover them.
>
> Which may be a bit more tricky than it looks as currently tasks don't
> provide metadata about themselves (tag name, namespace uri) as this is
> handled by the surounding concepts like the antlib task.
>

Namespace is usually derived from package name and can be derived from
module name.
Tag name can be derived from service name, and it looks like provider
method [1] could be used as a mechanism for aliasing.

> Since modules are a jar with a twist, it seems that they could be
> > abstracted as resources if one would like to expose what's happening
> > under the hood/bonnet.
>
> The term resource might be overloaded and mean different things to you
> and me. In Ant terms a module would be a ResourceCollection, probably.
>

I see. Thanks for correction.


> > The question was more about whether that exposure would be useful (so
> > that there could be ModuleSets, etc).
>
> Something like a ZipGroupFileset?
>

Exactly.

Gintas

[1]
https://docs.oracle.com/javase/9/docs/api/java/util/ServiceLoader.html#developing-service-providers


( ! ) Warning: include(msgfooter.php): failed to open stream: No such file or directory in /var/www/git/apache-ant-development/msg02047.html on line 108
Call Stack
#TimeMemoryFunctionLocation
10.0006364568{main}( ).../msg02047.html:0

( ! ) Warning: include(): Failed opening 'msgfooter.php' for inclusion (include_path='.:/var/www/git') in /var/www/git/apache-ant-development/msg02047.html on line 108
Call Stack
#TimeMemoryFunctionLocation
10.0006364568{main}( ).../msg02047.html:0