versionName is a tiny Java library that allows for conveniently reading the version name of an application from
- Manifest or
- property file.
Read more about it in those two blog posts
- Version names with Maven: Creating the version name (which refers to the examples) and
- Version names with Maven: Reading the version name (which refers to the library itself).
versionName consists of one class (as said before it's tiny) VersionNames that provides methods for reading the version name.
The public methods return a String that is never
null. In case of error, messages are written to a SLF4J-logger.
With maven for example
<dependency> <groupId>de.triology.versionName</groupId> <artifactId>versionName</artifactId> <version>1.0.2</version> </dependency>
You can also get snapshot versions from our snapshot repository (for the most recent commit on develop branch).
To do so, add the following repo to your
<repository> <id>snapshots-repo</id> <url>https://oss.sonatype.org/content/repositories/snapshots</url> <releases><enabled>false</enabled></releases> <snapshots><enabled>true</enabled></snapshots> </repository>
The examples show how to write a version name to your application using maven and how it can be read using the library from within applications (JAR or WAR). See examples/README.md