An open API service indexing awesome lists of open source software.

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

Awesome Lists containing this project

README

        

[![Build Status](https://travis-ci.org/bliblidotcom/version-plugin.svg?branch=master)](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
```