tomasbjerre / git-changelog-maven-plugin

Maven plugin that can generate a changelog, or releasenotes, from git repository
Other
78 stars 35 forks source link

maven release with tbhis plugin #14

Closed eimarfandino closed 4 years ago

eimarfandino commented 4 years ago

Hi,

How do you use this plugin with the maven release? I get all the time that the file CHANGELOG have been modified

tomasbjerre commented 4 years ago

I use it like this: https://github.com/tomasbjerre/violation-comments-to-gitlab-maven-plugin/blob/master/pom.xml#L128

eimarfandino commented 4 years ago

thanks @tomasbjerre, so if i understand correctly you use the phase deploy in order to avoid the CHANGELOG modifications to make a failure during release:prepare?

tomasbjerre commented 4 years ago

I use the default ignore filter: https://github.com/tomasbjerre/git-changelog-lib/blob/master/src/main/java/se/bjurr/gitchangelog/api/GitChangelogApiConstants.java#L11

So that the commits created by release-plugin will not change the changelog during release.

eimarfandino commented 4 years ago

problem i have is the following: i make a change i generate the changelog.md with the plugin (works great btw!) commit to a branch(so this commit is not in the changelog file) someone merge this branch into master and the release process starts release fails because changelog file is modified

this last commit is not in the file then.... here is where the problem lies down

tomasbjerre commented 4 years ago

Can be solved by adding the plugin to a profile and only run it when that profile is active.

There is also a skip-attribute that you can set to a property. Set the property to true in pom.xml. run with mvn -Ppropertname=false when you want to generate changelog.

eimarfandino commented 4 years ago

ok thanks. that is what i was thinking, just wanted to have this generation as part of the release process. keep up the good work! thanks