https://github.com/anirudhvarma12/wmv
WMV- Whats My Version is a maven plugin that stores version information in you jar/war file for you to retrieve it during runtime.
https://github.com/anirudhvarma12/wmv
egit java maven maven-plugin
Last synced: over 1 year ago
JSON representation
WMV- Whats My Version is a maven plugin that stores version information in you jar/war file for you to retrieve it during runtime.
- Host: GitHub
- URL: https://github.com/anirudhvarma12/wmv
- Owner: anirudhvarma12
- License: mit
- Created: 2015-12-26T09:08:19.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-10-11T04:41:41.000Z (almost 10 years ago)
- Last Synced: 2025-03-25T21:07:38.327Z (over 1 year ago)
- Topics: egit, java, maven, maven-plugin
- Language: Java
- Size: 15.6 KB
- Stars: 5
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Whats My Version - WMV
Whats My Version is a maven plugin that stores the version information of the artifact inside the jar/war file during packaging. This information can later be retreived easily to be used in anyway you want(like showing to user).
# Usage
The plugin is available through the central maven repository -
Add the following to your `pom.xml` :
```
com.github.anirudhvarma12
wmv-maven-plugin
2.1.2
generate-version-info
```
## Custom file name
You can change the output file name from `version.properties` to something that you like:
```
generate-version-info
myVersion.properties
```
## Custom file type
You can change the output file type from `properties` (default) to `json` or `xml`
```
generate-version-info
myVersion.properties
json
```
## Git Support
As of v2.1.1, WMV supports reading tags from Git for version name. To enable Git integration simply add `versionProvider` tag to the `configuration`. Eg:-
```
myVersion.properties
properties
git
```
WMV will always read the latest git tag.
## Retrieving info
The plugin is executed when you run `mvn install`, `mvn package`, `mvn compile`, it creates a `version.properties` file in the resources folder.
The properties looks like this -
```
#Auto generated
#Wed Dec 30 00:48:15 IST 2015
version=0.0.2-SNAPSHOT
date=30-12-2015 12-48-15
```
XML Structure:
```
2.1.0-SNAPSHOT
21-02-2016 23-46-33
```
JSON Structure:
```
{
"version": "2.1.0-SNAPSHOT",
"date": "21-02-2016 23-52-49"
}
```
# LICENSE
The MIT License (MIT), see `License` for details.