Skip to content

Commit

Permalink
[JENKINS-8383] record fingerprints of ancestor poms
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephan Pauxberger committed Sep 3, 2011
1 parent f2f1e72 commit 5d202a2
Showing 1 changed file with 9 additions and 1 deletion.
Expand Up @@ -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);
Expand Down

0 comments on commit 5d202a2

Please sign in to comment.