How can I use a Java application between assemblies?

My Java applications currently have the same version for each build. I use Maven, but I'm not sure how to configure the workflow to add a version to the application for each build.

I assume this works with my version control system? I am using git, does this mean that I need git tags?

Thanks for any ideas, I know this is a big question, but I'm not sure where to start.

+8
java git maven build-automation
source share
3 answers

You start by installing your version, for example, 1-SNAPSHOT.

Then you use the maven-release plugin to release early and often.

In the interim, each shot receives a unique time stamp.

If you want to apply a version that is not an official version of maven, see the buildnumber-maven file.

+6
source share

I am using this Maven plugin:

https://github.com/ktoso/maven-git-commit-id-plugin

and get it to create a git.properties file for me. This includes commit id, comments, etc.

From there you can do whatever you want. I have a properties page in my webapp that just git.properties everything in git.properties . It works for me.

+3
source share

You can use the POM maven file to determine versions. Here is an explanation.

You can also upgrade versions using this .

0
source share

All Articles