Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[JENKINS-8383] record fingerprints of ancestor poms

  • Loading branch information...
commit 5d202a2b9902082e9a44a2e0f5834e941b2c36dc 1 parent f2f1e72
@pauxus pauxus authored
View
10 maven-plugin/src/main/java/hudson/maven/reporters/MavenFingerprinter.java
@@ -81,7 +81,15 @@ public boolean preBuild(MavenBuildProxy build, MavenProject pom, BuildListener l
* Mojos perform different dependency resolution, so we need to check this for each mojo.
*/
public boolean postExecute(MavenBuildProxy build, MavenProject pom, MojoInfo mojo, BuildListener listener, Throwable error) throws InterruptedException, IOException {
- record(pom.getArtifacts(),used);
+ MavenProject parent = pom.getParent();
+ while (parent != null) {
+ // Parent Artifact contains no acual file, so we resolve against the local repository
+ Artifact parentArtifact = parent.getProjectBuildingRequest().getLocalRepository().find(parent.getArtifact());
+ record(parentArtifact, used);
+ parent = parent.getParent();
+ }
+
+ record(pom.getArtifacts(),used);
record(pom.getArtifact(),produced);
record(pom.getAttachedArtifacts(),produced);
record(pom.getGroupId(),pom.getFile(),produced);
Please sign in to comment.
Something went wrong with that request. Please try again.