Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

Enhanced maven-dependency-tree to allow resolution of reactor dependencies #5

Closed
wants to merge 4 commits into from
Closed

Enhanced maven-dependency-tree to allow resolution of reactor dependencies #5

wants to merge 4 commits into from

Conversation

william-ferguson-au
Copy link

Added an overloaded method to DependencyGraphBuilder that accepts the reactor projects and resolves dependencies from within the reactor.

  • Added multi-module-test to validate that the new method works against both direct and transitive deps.
  • Added multi-module-plugin to be used to validate multi-module-test
  • Added ProjectReferenceKeyGenerator as there is currently no public method to generate the key for MavenProject#projectReferences, MavenSession#projectMap or the Map of reactor projects that we will use.
  • Separated the reflective invocation out into the Invoker class.

… reactor projects and resolves dependencies from within the reactor.

- Added multi-module-test to validate that the new method works against both direct and transitive deps.
- Added multi-module-plugin to be used to validate multi-module-test
- Added ProjectReferenceKeyGenerator as there is currently no public method to generate the key for MavenProject#projectReferences, MavenSession#projectMap or the Map of reactor projects that we will use.
- Separated the reflective invocation out into the Invoker class.
@mosabua
Copy link
Member

mosabua commented May 15, 2014

Just fyi this is required for the Android Maven Plugin to work with aar packaged components that are resolved from the dependency tree outside as well as within the reactor.

@mosabua
Copy link
Member

mosabua commented May 15, 2014

fyi @jvanzyl

@Gnafu
Copy link

Gnafu commented May 17, 2014

I tried this branch with a multimodule project using ActionBarSherlock and multiple apklib with native code.
The maven-android-plugin is 3.9.0-SNAPSHOT
Everything went fine.

@william-ferguson-au
Copy link
Author

Great. Thanks for the feedback.
On May 17, 2014 8:25 PM, "Gnafu" notifications@github.com wrote:

I tried this branch with a multimodule project using ActionBarSherlock and
multiple apklib with native code.
The maven-android-plugin is 3.9.0-SNAPSHOT
Everything went fine.


Reply to this email directly or view it on GitHubhttps://github.com//pull/5#issuecomment-43403368
.

@hboutemy
Copy link
Member

there are license problems in this commit

see "mvn apache-rat:check" result:

Unapproved licenses:

src/main/java/org/apache/maven/shared/dependency/graph/ProjectReferenceKeyGenerator.java
src/main/java/org/apache/maven/shared/dependency/graph/internal/Invoker.java
src/it/multi-module-
plugin/src/main/java/org/apache/maven/its/deptree/ResolveDependenciesLifecycleParticipant.java
src/it/multi-module-
plugin/src/main/java/org/apache/maven/its/deptree/DummyMojo.java
src/it/multi-module-
test/moduleZDepsY/src/main/java/org/apache/maven/shared/dependency/ContainingClass.java
src/it/multi-module-
test/moduleX/src/main/java/org/apache/maven/shared/dependency/SimpleClass.java
src/it/multi-module-test/expected-tree.txt
src/it/multi-module-test/invoker.properties
src/it/multi-module-
test/moduleYDepsX/src/main/java/org/apache/maven/shared/dependency/DependentClass.java
src/it/multi-module-test/verify.bsh

@hboutemy
Copy link
Member

in interface DependencyGraphBuilder, why expect a Map<String, MavenProject> reactorProjects, when a List seems simpler and more natural (result from MavenSession.getProjects())?

@hboutemy
Copy link
Member

in pom.xml, why remove */pom.xml?

@hboutemy
Copy link
Member

in Maven31DependencyGraphBuilder.java, why use invoker for invoker.invoke( result.getUnresolvedDependencies(), "removeAll", Collection.class, reactorDeps ); : this is simply collection, no?

@hboutemy
Copy link
Member

https://jira.codehaus.org/browse/MSHARED-336 opened to track this pull request

@hboutemy
Copy link
Member

notice there are a few places where coding conventions are not respected: this would be great if you could have a look (previous comments are more important :) )
see http://maven.apache.org/developers/conventions/code.html for more information, and tooling for automatic IDE handling

@jvanzyl
Copy link
Contributor

jvanzyl commented May 18, 2014

Having to run mvn apache-rat:check to find files without licenses is a usability fail. No user is ever going to know to run this. I have setup Maven core to always check, as having to run this separately means no one ever is. I will change the setup in the project as the current mode of operation is just going to have anyone who ever contributes not know there is a problem.

@jvanzyl
Copy link
Contributor

jvanzyl commented May 18, 2014

William, you may want to let the code sync and we'll transfer the comments to another pull request. I squashed all your commits into one so we can work together on another one to sort out any other issues.

@jvanzyl
Copy link
Contributor

jvanzyl commented May 18, 2014

William, I can take care of the missing licenses and formatting and then we'll go from there.

@jvanzyl
Copy link
Contributor

jvanzyl commented May 18, 2014

William, there is one file that has an EPL license but it looks like you wrote it. I changed it to ASL, just confirm this is all correct.

@jvanzyl
Copy link
Contributor

jvanzyl commented May 18, 2014

Wiiliam, all formatting and license issues are taken care of aside from verifying that the one file, ResolveDependenciesLifecycleParticipant.java, can be licensed ASL.

The rest of the questions from Herve you can answer on the dev mailing list.

@william-ferguson-au
Copy link
Author

ResolveDependenciesLifecycleParticipant.java, can be licensed ASL. The code is mine, it just started out from what I committed to the android-maven-plugin.

Let me now where to send any follow up commits, like the ASL for ResolveDependenciesLifecycleParticipant.java

I'll reply to the others, one by one of the dev list.

@jvanzyl
Copy link
Contributor

jvanzyl commented May 18, 2014

Cool, I've already changed the license as it looked like it is all your code.

@pono pono closed this May 28, 2016
@william-ferguson-au william-ferguson-au deleted the resolving-reactor-deps branch May 28, 2016 22:57
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
6 participants