Currently, there is a filename/regex-based check for determining if a file in scijava.app.directory conflicts with the artifact to be installed. While this check works, it has hardcoded patterns and is thus not extensible w.r.t. new architectures, etc.
We (@ctrueden and I) have come up with the following scheme to extract the version and qualifier of an artifact:
- Look in Jar for version information:
pom.properties in META-INF/maven/<groupId>/<artifactId>/ (if found, return)
pom.xml in META-INF/maven/<groupId>/<artifactId>/ (if found, return)
MANIFEST.mf (Implementation-Version)
- If a 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
scijava.app.directoryconflicts with the artifact to be installed. While this check works, it has hardcoded patterns and is thus not extensible w.r.t. new architectures, etc.We (@ctrueden and I) have come up with the following scheme to extract the version and qualifier of an artifact:
pom.propertiesinMETA-INF/maven/<groupId>/<artifactId>/(if found, return)pom.xmlinMETA-INF/maven/<groupId>/<artifactId>/(if found, return)MANIFEST.mf(Implementation-Version)