Open jglick opened 6 years ago
To be honest, I was not even aware of the .mvn/maven.config
feature. I am using some maven internals to resolve the POM but it seems these maven internals do not care about .mvn/maven.config
.
You are right that it would be a nice feature enhancement to have at least an option to include this in the flattened POM.
Please note that I just created this plugin as a first mover and as a workaround for features IMHO missing in maven. Feel free to provide a PR for this or to make maven core support all this out of the box. However, I do have tons of other OSS projects and am therefore unable to implement every bell and whistle others may want to have.
Oh, understood! For the moment this is not much of a priority I think, but if it becomes one I would certainly try to offer a PR.
Thanks for your feedback. Still considered as a reasonable feature-enhancement but with lower priority. Still my biggest hope would be some movement in maven core to work on maven 4.x and support consumer POM out of the box making flatten-maven-plugin obsolete.
As of https://github.com/jenkinsci/workflow-basic-steps-plugin/commit/f9f8b16a5b92226bfe868e7f90d2ad04fe1c2af4 if you
mvn compile
using Maven 3.5.3 you will see atarget/copyartifact-1.41-SNAPSHOT.pom
which includesThis is missing another repository definition defined in a profile in the parent POM which is activated unconditionally in the child POM based on an entry in
.mvn/maven.config
. Indeed some of the<dependencies>
(in this exampleworkflow-step-api
andworkflow-api
) are found only in that repository.My intuitive understanding of a flattened POM is that it should include everything another module might need to know in order to consume this artifact;
repositories
is included because transitive dependencies might be needed. So if a downstream module attempted to depend on this version ofworkflow-basic-steps
, it would by default have dependencies onworkflow-step-api
andworkflow-api
, but might not be able to retrieve them unless it itself declared that<repository>
(or a~/.m2/settings.xml
did the same).