You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@eagle.apache.org by "Huizhi Lu (JIRA)" <ji...@apache.org> on 2016/09/30 01:03:21 UTC
[jira] [Created] (EAGLE-581) Generate a build number when building
the project.
Huizhi Lu created EAGLE-581:
-------------------------------
Summary: Generate a build number when building the project.
Key: EAGLE-581
URL: https://issues.apache.org/jira/browse/EAGLE-581
Project: Eagle
Issue Type: New Feature
Affects Versions: v0.5.0
Reporter: Huizhi Lu
Assignee: Huizhi Lu
Fix For: v0.5.0
Use case:
we need to know what version(latest commit revision) of source code we are using for the current build so that it will be convenient for us to clarify different builds.
Solution:
Use buildnumber-maven-plugin
1. Add Maven plugin buildnumber-maven-plugin to pom.xml file
2. Add build property placeholders
create a build.properties file (e.g. in src/main/resources):
build.properties:
build.version=${version} # Maven version
build.revision=${buildNumber} # Source code revision number
build.timestamp=${timestamp} # long value of check in time
3. Using build number in web app
@Value(“${build.revision}”)
private String buildRevision;
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)