Currently, my Java applications have the same version on every build. I am using Maven, but I am not sure how to set up the workflow to add a version to the application on each build.
I imagine this works with my version control system? I am using git, does this mean I need git tags?
Thanks for any insights, I know it's a big question, but I am not sure where to get started.
Yes, you can run multiple JVM's on a single machine.
If your application runs in a web browser using Java's browser plugin, you can only have one version at a time. Ignition does not use Java's browser plugin so you can continue using an older version. It is easy to specify which Java version you want to use when running Ignition's client.
Open a command prompt (Click Start > Run and type cmd). Use jre at the command prompt. This will return the Java JRE version number that is found in your path. Use java -version at the command prompt to check the version of the JDK in your path.
You start by setting your version to, for example, 1-SNAPSHOT.
Then you use the maven-release-plugin to release early and often.
In the interim, each snapshot gets a unique timestamp.
If you want to apply a version that isn't the official maven version, see the buildnumber-maven-plugin.
I use this Maven plugin:
https://github.com/ktoso/maven-git-commit-id-plugin
and get it to generate a git.properties
file for me. This includes the commit id, comments, etc.
From there, you can do whatever you like. I have a properties page in my webapp that simply iterates over everything in git.properties
. Works for me.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With