[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[aether-users] Using Aether for classpath management
|
Hi all,
I recently discovered Aether and wonder how I can make the best use of it.
My scenario is the following: In a component runtime I want to automatically
add dependencies to the classpath, when a component artifact is added.
Artifacts may be in remote repositories, only in the local repository or
even only in the workspace (e.g. in when building a multi-module maven
project
on the local hard disk).
I made some progress and obtained promising initial results.
Yet, I'm currently lost with respect to several issues:
1. I want to make use of the existing maven infrastructure (e.g.
settings.xml
and information from the POMs). Is there a clean way to obtain such settings
in the way maven does it? The Aether demo only uses hard-coded information
(e.g. local and remote repository locations)...
2. I typically start from a POM loaded via the ModelBuilder (e.g. as
found in a
JAR file that has been added to the component runtime by some user).
This requires lots of mappings between Aether classes and Maven classes
(e.g.
org.sonatype.aether.graph.Dependency vs. org.apache.maven.model.Dependency).
I found some private conversion code in DefaultArtifactDescriptorReader
from package
org.apache.maven.repository.internal. Does this mean that there is no
public API
available for this purpose and I have to re-implement the conversion myself?
3. Is there a way that I can tweak Aether to work on artifacts in a
workspace
instead of a local or remote repository?
Thanks in advance.
Cheers,
Alex