Skip to content

Commit

Permalink
[MARTIFACT-67] track Maven 4 -build.pom
Browse files Browse the repository at this point in the history
  • Loading branch information
hboutemy committed Oct 15, 2024
1 parent 01df5ae commit edddb43
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,20 @@ void printArtifacts(MavenProject project) throws MojoExecutionException {
pomArtifact.getFile(),
project.getArtifactId() + '-' + project.getVersion() + ".pom");

if (consumerPom != null) {
// build pom
Artifact buildPomArtifact = new DefaultArtifact(
project.getGroupId(), project.getArtifactId(), "build", "pom", project.getVersion());
buildPomArtifact = buildPomArtifact.setFile(project.getFile());

artifacts.put(buildPomArtifact, prefix + n);
printFile(
prefix + n++,
buildPomArtifact.getGroupId(),
buildPomArtifact.getFile(),
project.getArtifactId() + '-' + project.getVersion() + "-build.pom");
}

if (project.getArtifact() == null) {
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
import org.eclipse.aether.artifact.DefaultArtifact;

/**
* Describe build output.
* Describe build output (experimental).
* It is expected to be used aggregator used from CLI, ie run at root after everything has run, but not bound to any build
* phase, where it would be run at root before modules.
* @since 3.5.2
Expand Down

0 comments on commit edddb43

Please sign in to comment.