We could definately use multiple threads to download in parallel. In
this case we would not need a service.
Aether already supports resolving a list of artifacts. So I think this
might perform better. Quite possibly aether uses threads for this
internally.
Pax-url-aether does not export the aether API. It just provides the URL
support. That is why I think a service could be able to provide some
additional features.
Ideally I would like to do this separately from pax url aether as it is
out of scope of pax url but it would save us from embedding aether into
yet another module.
Of course pax url aether could directly provide a completer but that
would tie it to the shell. So providing a service with a basic API
sounds better to me.
Christian
Am 26.06.2012 18:52, schrieb Guillaume Nodet:
Downloads can be done concurrently using the aether API afaik, so if
that's for the features service, we can just modify the code to spawn
multiple threads and wait for them to complete, so we can actually
achieve concurrent downloads.
For the completion, I'd just write a completer, not sure if there's a
need for a service, but that's a minor point I guess.
Does pax-url-aether exports the aether api at all ?
On Tue, Jun 26, 2012 at 11:50 AM, Christian Schneider
<[email protected]> wrote:
Hi all,
I would like to offer two aether features as an OSGi service.
- Getting the available versions of an OSGi service
I would like to use this in the feature:repo-add to offer completion for
well known feature files like:
feature:repo-add camel <tab>
This should show the available versions of the apache camel feature file.
- Resolving a whole list of artifacts by their mvn: url to speed up
downloads
Currently we resolve one artifact after the other when using pax url. So for
example if we install a feature we download one jar after the other. I would
like
to use the above service method to resolve the whole list of artifacts for a
feature so aether can download them in parallel. So we could call this
service before doing the
normal feature install.
The main question is where to locate such a service. As aether is not yet
available as an OSGi bundle we need to embed it. As pax url aether already
does this it could make sense to locate the service there. Another argument
to add the service to pax url aether is that we need to share the maven
config.
What do you think?
Christian
--
Christian Schneider
http://www.liquid-reality.de
Open Source Architect
Talend Application Integration Division http://www.talend.com
--
Christian Schneider
http://www.liquid-reality.de
Open Source Architect
Talend Application Integration Division http://www.talend.com