Hello,

I am working on a maven plugin which is supposed to write a list of
dependencies (all dependencies, also transitive ones) of the current
artifact to the file. All those dependencies are OSGi bundles which are
used in the following step in a pax runner to launch OSGi environment. I
found aether and managed to write simple POC which lists dependencies that
I need. However I have the following problem. I want my plugin to be usable
in both maven-2.x and maven-3.x and I cannot force aether to work in
maven-2.x.
Is there some uniform way of getting all transitive dependencies of the
current artifact which would be compatible with both maven-2.x and
maven-3.x?

For now I figured out that I can built separate JAR artifact which
assemblies all needed depedencies (aether and others) and then simply do:
    Process p = Runtime
    .getRuntime()
    .exec("java -jar artifact.jar-with-dependencies.jar");

Yeah I know that it's ugly but it works :]. Another workaround would be to
also have this separate JAR and jail it in my own classloader - not that
hard to do.

Anyway I cannot figure out straighforward solution.

I would be thankful for any help.


Kind Regards,

Marek Psiuk

Reply via email to