Hi Olivier,

assuming this bom file is not used by the reactor, it should be possible to possible to generate it in the root pom and attach it with its own GA[1][2]. The javadoc content says this piece of code is deprecated, probably because it introduces some magic where it is hard to determine where the file is coming from. I think we should be able to allow this and in case of pom.xml let Maven add some XML comment saying it was provided as part of project GA(V)

Is this less hackish?

Robert


[1] https://maven.apache.org/ref/3.5.0/maven-core/apidocs/org/apache/maven/project/MavenProject.html#addAttachedArtifact(org.apache.maven.artifact.Artifact)

[2] https://maven.apache.org/ref/3.5.0/maven-core/apidocs/org/apache/maven/project/DefaultMavenProjectHelper.html#attachArtifact(org.apache.maven.project.MavenProject,%20org.apache.maven.artifact.Artifact)


On Fri, 09 Jun 2017 08:35:11 +0200, Olivier Lamy <ol...@apache.org> wrote:

Hi,
Not sure how to do that in a non hackhish way.
My current goal: generate a bom style pom with all reactor projects in
dptMngt section.
As people are lazy to write dptMngt section in theirs poms they delegate to
others with this pom.
So as I'm lazy too I don't want to write/maintain this pom neither so I
prefer using a plugin for that :-)
So I create a new packaging type bom and enable it on a pom.
The plugin simply generate a pom.xml file with all content and the
calculated dptMngt section.
The only way I found to replace the current pom is to use: project.setFile(
the new pom file)

Any other way?

Cheers

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org

Reply via email to