apache/karaf — pull request #24 by grgrzybek (2014-01-24 08:34:38+00:00)
Title: [KARAF-2395] Make karaf-maven-plugin usable with Maven 3.1 and 3.0

Mojos use available Aether subsystem (Sonatype or Eclipse) by looking at what's
available in PlexusContainer.

It's easy to add Maven deps for both Sonatype and Eclipse versions of Aether, but it's not that easy to depend on both `maven-core:3.0.3` and `maven-core:3.1.0+`.

Mojos don't get particular Aether component autowired directly by type - the can however get autowired entire `PlexusContainer`. We the look at the available Aether subsystem and the use a `DependencyHelper` layer to access Aether (both Sonatype and Eclipse).

`karaf-maven-plugin` may use `maven-core` API directly for Sonatype version of Aether (for dependency on `maven-core:3.0.3`, but it also can use Eclipse Aether and the methods from Maven API which reference Eclipse Aether when used with Maven 3.1.0+ - it however requires a bit of reflection.