I am using the specification to import dependencies from another project into mine, and I need a way to reference the version of dependencies that is already declared in the specified specification. So far I have tried to list the dependency version as a property in the specification, but this approach failed because the properties are not imported using the specifications.
I saw where the Dependency Plugin plugin is : dependency: the properties do almost what I need, but instead of giving me the full path, the Artifact I need a version as a property. Is there anything that can give me a version of the allowed artifact as a property?
UPDATE - "Why not use the parent pom?"
I usually find myself working in application server environments where the provided dependencies are specified using specification artifacts (this seems to have become a fairly common standard way to distribute groups of related artifacts, i.e. widlfly ). Therefore, I want to consider this specification as the only source of truth. The idea of ββdoing something like altering a property of a dependency version that has already been defined in the specification seems wrong.
If I defined the properties of the parent pom, which reflected the application server environment, now I need to worry about preserving the properties of the parent pom and the specification properties - why do they even have the specification at this point?
Information is already available in the dependency tree, it's just a matter of exposure ...
java maven maven-bom
Joshc13
source share