You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tamaya.apache.org by "Oliver B. Fischer (JIRA)" <ji...@apache.org> on 2016/02/13 23:33:18 UTC
[jira] [Commented] (TAMAYA-139) Integrate maven version of Tamaya
into JSON being exposed in its implementation
[ https://issues.apache.org/jira/browse/TAMAYA-139?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15146227#comment-15146227 ]
Oliver B. Fischer commented on TAMAYA-139:
------------------------------------------
Unfortunately we can not use Maven's filtering features for source code. At least I wouldn't use it for this. The best solution would be the write this information to a properties file during the build and to read it on start up.
> Integrate maven version of Tamaya into JSON being exposed in its implementation
> -------------------------------------------------------------------------------
>
> Key: TAMAYA-139
> URL: https://issues.apache.org/jira/browse/TAMAYA-139
> Project: Tamaya
> Issue Type: Improvement
> Affects Versions: 0.2-incubating
> Reporter: Philipp Ottlinger
> Assignee: Oliver B. Fischer
> Priority: Minor
>
> While working on TAMAYA-134 I stumbled upon
> {code}
> org.apache.tamaya.server.ConfigurationResource
> {code}
> containing the following JSON snippet in its
> version():
> {code}
> "{ \"version\" : \"Apache Tamaya: 0.2-incubating\" }"
> {code}.
> This information should be calculated depending on mvn version information.
> One way is to generate a class with maven-resource-plugin that contains the version such as:
> {code}
> class Version {
> private String version = "${project.version}";
> public String getVersion() {
> return version;
> }
> }
> {code}
> This class can be used in a static matter in this endpoint.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)