git-changelog-lib icon indicating copy to clipboard operation
git-changelog-lib copied to clipboard

Accept URL for templatePath

Open driew12 opened this issue 1 year ago • 3 comments
trafficstars

It would be nice to be able to use a template located by a URL.

For example, when we need to use the same template in multiple projects. And it would help to easily maintain changes to the template without copying it to all projects after every change.

In my case, I use git-changelog-lib with the maven plugin. And i want to use something like that:

...
						<configuration>
							<templateFile>https://raw.githubusercontent.com/tomasbjerre/git-changelog-lib/master/src/main/resources/changelog.mustache</templateFile>
						</configuration>
...

driew12 avatar Jun 05 '24 13:06 driew12

I would put the plugin configuration in a parent pom and reuse that in different projects. Something like what I have done here: https://github.com/tomasbjerre/bjurr-bom/blob/8d16cfdd4fc29c230afd701f2c540e19dc33f33d/pom.xml#L141

tomasbjerre avatar Jun 05 '24 14:06 tomasbjerre

Unfortunately, in my case, it is impossible to edit the parent pom file :( What do you think about this solution? - https://github.com/tomasbjerre/git-changelog-lib/pull/185

driew12 avatar Jun 05 '24 14:06 driew12

If you cannot change the parent, you can add it as a dependency: https://github.com/tomasbjerre/bjurr-bom/tree/8d16cfdd4fc29c230afd701f2c540e19dc33f33d?tab=readme-ov-file#import-the-bom

I think that is the solution for this kind of issue. It solves all other configuration that you may want to have for all your projects within your organization.

tomasbjerre avatar Jun 05 '24 14:06 tomasbjerre