You can do that with a LifecycleParticipant.. the Android Maven Plugin has an example that works with the dependencies and deals with resolving transitive dependencies of AAR and APKLIB artifacts.
Check it out at https://github.com/simpligility/android-maven-plugin/blob/master/src/main/java/com/jayway/maven/plugins/android/phase_prebuild/ClasspathModifierLifecycleParticipant.java richard_senior wrote on 10.03.2015 09:03: > There is currently no phase in which you can run a plugin that is before > dependency resolution. > I believe this is a problem for Maven. > Imagine I wanted to create a plugin which could be used by the whole > company, and enforced a particular version naming strategy. > So take Spring for example, they are using an RC and RELEASE naming > convention. > Imagine I wanted to allow people to name their artifacts _BRANCH_5. > My plugin with find that and realise that a repository named > 'http://blah/blah/BRANCH_5' should be added to the repositories list (before > resolution obviously). > Also, I can now get my plugin to add a different distrubutionManagement > section allowing the artifacts to be deployed to > http://blah/blah/BRANCH_5. > > By the simple act of naming artifacts I can now manage multiple workstreams > in my pipeline with ease, and without requiring special settings files or > parent POM's. > > While I'm on the subject of Maven deficiencies, why is it not possible to > specify distrubutionManagement in settings? > In fact.. it doesn't matter why... it's wrong. > Sometimes ... just sometimes.. I do believe I might try Gradle. > > > > -- > View this message in context: > http://maven.40175.n5.nabble.com/Maven-phase-that-runs-before-dependency-resolution-tp5828729.html > Sent from the Maven - Users mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
