0

I have a java project. I need to versionise the project while creating the jar file. One way I could find is using the Manifest files. But I can add the version only when I am exporting to Jar file( Not Runnable jar).

I am not able to specify a version for a runnable jar file. Need help in versioning the jar files.

manutd
  • 291
  • 1
  • 5
  • 18
  • Are you saying a runnable .jar file is not a .jar file? – VGR Oct 19 '17 at 13:14
  • No. While exporting to a runnable jar file I can not version the jar file. Manifest file does not contain information regarding the version. I can not find a way to mention that in Manifest file too. – manutd Oct 19 '17 at 13:17
  • Could you add an example to your question of what you are looking for? The easiest may be to ask the operating system to rename your jar file to something including the current date and time. – Thorbjørn Ravn Andersen Oct 19 '17 at 13:24
  • That could be one solution. But If there is some provision in eclipse much appreciated. Thanks. – manutd Oct 19 '17 at 13:28
  • Eclipse itself uses [PDE API Tools](https://www.eclipse.org/pde/pde-api-tools/) to increase the OSGi bundle version number if and only if it is required. [Bndtools](http://bndtools.org/) does this in a different way. Even though OSGi is not a requirement for you, both tools could be handy for versioning plain Java APIs. – howlger Oct 19 '17 at 13:45

0 Answers0