Ticket #1410 (closed enhancement: fixed)
Opened 2012-08-15T13:00:46-05:00
Last modified 2012-09-06T19:00:19-05:00
Refactor imagej.ImageJ.VERSION
Reported by: | dscho | Owned by: | dscho |
---|---|---|---|
Priority: | trivial | Milestone: |
|
Component: | Core | Version: | |
Severity: | cosmetic | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | #1400 |
Description
Let's extract the version from the .jar file (or from the pom.xml if we're still unpacked).
To that end, refactor out a method from FileUtils.getBaseDirectory() that returns the class path entry for the given class, as a File instance. It may be a .jar and it may be a directory. Then, add a method getVersion(File classPathEntry) to extract the version from manifest or pom.xml.