Currently, there is a filename/regex-based check for determining if a file in imagej.app.directory conflicts with the artifact to be installed. While this check works, it has hardcoded patterns and is thus not extensible if e.g. artifacts with new architectures show up.
We (@ctrueden and I) have come up with the following scheme to extract the version and qualifier from a Jar file:
Look in Jar for version information:
pom.xml in META-INF (if found, return)
MANIFEST.mf (implementation version)
If the version is found in the filename suffix, the rest is a qualifier [If not: ij.jar or inconsistent: warning]
If nothing is in the filename
use regex (dash+digit: substring)
if there is no version, assume there is a qualifier or suffix
Currently, there is a filename/regex-based check for determining if a file in
imagej.app.directory
conflicts with the artifact to be installed. While this check works, it has hardcoded patterns and is thus not extensible if e.g. artifacts with new architectures show up.We (@ctrueden and I) have come up with the following scheme to extract the version and qualifier from a Jar file:
implementation version
)