taverna-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stian Soiland-Reyes <st...@apache.org>
Subject Re: Version
Date Wed, 19 Aug 2015 23:58:23 GMT
Yes, I saw this.

The best would be if you could pick up the version from the Maven pom
file.. so it is auto-updated, e.g. it would be
0.15.1-incubating-SNAPSHOT now.

I remember a way to do this with generating a special resource file in
Maven that you then read from inside.. but I think now you can do it
easier by using something like
and read it as a java.util.Properties file

cat META-INF/maven/org.apache.taverna.language/taverna-language-commandline/pom.properties
#Generated by Maven
#Thu Aug 20 00:31:04 BST 2015

This would however be fragile to the hardcoded Maven groupId and
artifactId that is part of the path.

Alternatively I think you can use the fact that every Taverna JAR is a
bundle, and read the META-INF/MANIFEST.MF for your package:

Implementation-Title: Apache Taverna Language Commandline
Implementation-Version: 0.15.1-incubating-SNAPSHOT

which I think you can access with something like

            System.out.println(" " +

Now if this works, this is probably the neatest.. but you would have
to check if that would still give the right result within the shaded
JAR which might mangle that META-INF/maven file.

On 20 August 2015 at 00:42, Menaka Madushanka <menaka12350@gmail.com> wrote:
> Hello Stian,
> I have asked this before also... about showing the version (tavlang version)
> I used a format like this.
>     Apache Taverna Language Commandline tool
>     Version 1.0
> I know this is not appropriate. So what would be in the version information?
> Is it 0.15.1?
> Cheers
> Menaka
> --
> Menaka Madushanka Jayawardena
> Faculty of Engineering,
> University of Peradeniyaya.
> LinkedIn

Stian Soiland-Reyes
Apache Taverna (incubating), Apache Commons RDF (incubating)

View raw message