https://github.com/bliblidotcom/version-plugin
Version Plugin for Spring Boot
https://github.com/bliblidotcom/version-plugin
Last synced: 3 months ago
JSON representation
Version Plugin for Spring Boot
- Host: GitHub
- URL: https://github.com/bliblidotcom/version-plugin
- Owner: bliblidotcom
- License: apache-2.0
- Created: 2017-12-12T05:04:01.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2021-05-17T08:29:06.000Z (about 4 years ago)
- Last Synced: 2025-01-23T16:10:05.489Z (5 months ago)
- Language: Java
- Size: 11.7 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://travis-ci.org/bliblidotcom/version-plugin)
Spring Boot Version Plugin
--------------------------Add this dependency in your ```pom.xml```
```xml
...
false
bintray-bliblidotcom-maven
bintray
https://dl.bintray.com/bliblidotcom/maven
...```
```xml
...
com.blibli.oss
version-plugin
...
...```
Add in your `pom.xml` `properties` tag
```xml
...
${maven.build.timestamp}
yyyy-MM-dd HH:mm:ss
...
```Add in your `pom.xml` `build` tag
```xml
...
src/main/resources
true
...```
Create `version.properties` file in `src/main/resources`
```properties
[email protected]@
[email protected]@
[email protected]@
application.build-time=@timestamp@
```Run your spring boot app, and see :
```
http://localhost:8080/version
``````text
maven.groupId=com.example
maven.artifactId=demo
maven.pom.version=0.0.1-SNAPSHOT
maven.build.time=2017-02-03 03:30:30
```