jgitver-maven-plugin icon indicating copy to clipboard operation
jgitver-maven-plugin copied to clipboard

evaluate usage of configuration section in plugin to replace '.mvn/jgitver.config.xml'

Open McFoggy opened this issue 6 years ago • 2 comments

as described in Gitter : https://gitter.im/jgitver/Lobby?at=5d8b10be63b06968fbe59c1a we could think of using a configuration section of a jgitver plugin to replace the .mvn/jgitver.config.xml file.

NOTE: there could be tradeoffs in this usage and thus some POCs to do because jgitver comes into the party before/during the full evaluation of the POM:

  • regarding properties evaluation inside the configuration
  • regarding parent POM plugin/config definition
  • ...

McFoggy avatar Sep 25 '19 07:09 McFoggy

Not sure if I understood this issue correctly: if you allow configuration to be in the POM directly, is there any chance this configuration can be inherited from the parent POM or even from some shared/CI-injected properties? We are trying to use jGitVer as a replacement for a custom versioning solution where all the versioning and distribution management was dictated strictly by the parent POM. My understanding is that jGitVer extension itself cannot be injected by the parent POM, but it would be really nice if at least the configuration/versioning-policy could be centralised this way.

Is this issue going to allow for this? Is there any way of doing this at the moment? We can somehow live with having to setup the extension for each project separately, but not for the config duplication.

Let me know if you want me to create a new issue, I just thought it is related enough to be in one thread :-)

ztmr avatar Jan 12 '21 15:01 ztmr

but it would be really nice if at least the configuration/versioning-policy could be centralised this way

Indeed that was the idea of the issue.

It really requires an evaluation because at the time jgitver is loaded in the reactor build, the POM (as object model) comes only as a data model loaded from XML, nothing is applied to it : no inheritance, properties resolution, ... In fact it would require at this exact loading time to evaluate the "effective POM" to look for such a configuration. Not sure how to it and if it is right to do it.

McFoggy avatar Jan 12 '21 16:01 McFoggy