jgitver / jgitver-maven-plugin

maven core extension to automatically define versions using jgitver & git tags
https://jgitver.github.io/
Other
159 stars 41 forks source link

what is different between 1.5.1 and 1.7.1 #151

Open soloturn opened 3 years ago

soloturn commented 3 years ago

tried to use the newest version 1.7.1 and jenkins builds behaved different than before. when creating an annotated tag called 1.0.0 it builds.

with 1.5.1. the behaviour is the same running local and running on jenkins. it creates myjar-1.0.0.jar out of a tag with name 1.0.0 on the current build. for jenkins, one needs to make sure it retrieves the tags, whihc is not the default. then it would build myjar-1.0.0.jar, just as local.

with 1.7.1 the behaviour changed slightly. local it continues to build myjar-1.0.0.jar. but on jenkins it creates 1.0.1-SNAPSHOT out of the same commit.

i tried to make out what changed from 1.5.1 to 1.7.1 but could not see the cause immediate. would you know where this different behaviour might come from?

McFoggy commented 3 years ago

might come from jgitver/jgitver#106. related commits:

Brixomatic commented 3 years ago

"with 1.7.1 the behaviour changed slightly. local it continues to build myjar-1.0.0.jar. but on jenkins it creates 1.0.1-SNAPSHOT out of the same commit."

Does the Jenkins build contain/create local changes to resources tracked by git? If so, this might be where the snapshot comes from.

McFoggy commented 3 years ago

Does the Jenkins build contain/create local changes to resources tracked by git?

a simple git status before calling mvn would help understand the state of the repository