You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by John <jo...@quivinco.com> on 2013/04/24 09:44:36 UTC

trying to set app version using manifest.mf

Hi,

I have been trying to use the following code in QaModule to set the application version using the same as the maven version. It doesn't seem to work, the manifest is under /META-INF. I'm using Jetty 6.1.16 both with the WAR and unpacked as a directory, same result, null.
String version = QaModule.class.getPackage().getImplementationVersion();

if (version != null) {

configuration.add(SymbolConstants.APPLICATION_VERSION, version+ "(QA)");

}

I thought I had this working in earlier versions of the code. Anyone else had any success setting app version out of a manifest like above?

John

Re: trying to set app version using manifest.mf

Posted by John <jo...@quivinco.com>.
The only neat solution I found for this was to JAR my tapestry app into the WAR lib thus:
<archiveClasses>true</archiveClasses>

  ----- Original Message ----- 
  From: John 
  To: users@tapestry.apache.org 
  Sent: Wednesday, April 24, 2013 8:44 AM
  Subject: trying to set app version using manifest.mf


  Hi,

  I have been trying to use the following code in QaModule to set the application version using the same as the maven version. It doesn't seem to work, the manifest is under /META-INF. I'm using Jetty 6.1.16 both with the WAR and unpacked as a directory, same result, null.
  String version = QaModule.class.getPackage().getImplementationVersion();

  if (version != null) {

  configuration.add(SymbolConstants.APPLICATION_VERSION, version+ "(QA)");

  }

  I thought I had this working in earlier versions of the code. Anyone else had any success setting app version out of a manifest like above?

  John

Re: trying to set app version using manifest.mf

Posted by Lance Java <la...@googlemail.com>.
If you are running through your IDE (eg from class folders instead
of .jar/.war) then you will not be able to get the version since maven has
not packed the artifacts.

This might help:
http://stackoverflow.com/questions/2712970/how-to-get-maven-artifact-version-at-runtime