-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve detection of conflicting artifact versions #21
Comments
Example of case when the regex results in having 2 distinct dependency artefacts erroneously overwritten for IJ-OpenCV, namely opencv and opencv-platform. |
This is a quickfix until #21 is resolved. When an arch is not present in the regular expression, the arch modifier is interpreted as part of the version string, resulting in bogus behavior.
Some results of a recent investigation: An exemplary
The issue with that is that qualifiers are not contained in here. The The |
I'd forgotten all about this issue, sorry. For now, let's just add to the regex to cover the IJ-OpenCV use case. @LauLauThom What are the exact filenames that are separate classifiers, and scijava-maven-plugin should detect as such?
Here is a recent commit after which our commit should be modeled: It's too bad the Java ecosystem has not unified around fewer native JAR wrapper naming schemes. But adding to the regex is straightforward—especially if you also add a unit test ensuring it's working as desired. |
We also might need to special-case classifiers such as |
After I excluded Furthermore, excluding |
@rimadoma We are in the process of switching to the newer miglayout-swing 5.2 which does not use In the meantime, in addition to excluding the old miglayout artifact, try also adding P.S. About your GitHub tagline "L'ordinateur a dit 'Non'": are you quoting Little Britain‽ 😆 🏆 |
@ctrueden Adding P.S. I am. Just having fun with my pidgin French. TBH I don't really know the show, but as a programmer that quote speaks to me. |
@LauLauThom Could you please test pom-scijava 29.0.0-beta-1—which uses scijava-maven-plugin 2.0.0—and report back whether there are still problems with IJ-OpenCV? With cca73a7 it might be fixed. And if it's not fixed, I'm guessing that fixing it now will be much more trivial. |
@ctrueden Yeah that works ! Thanks a lot ! And sorry for the late reply, yesterday was off 😎 Just the updater recognizes some artifacts as conflicting. But I guess it is relying on the same logic than Maven no ? so could it be just a matter of updating it too ? |
Reviewing this issue now in 2024, I don't see any more work that needs to be done, so... closing! Please reopen if you continue to have issues with conflicting artifact versions not being treated properly by the plugin. |
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:
pom.properties
inMETA-INF/maven/<groupId>/<artifactId>/
(if found, return)pom.xml
inMETA-INF/maven/<groupId>/<artifactId>/
(if found, return)MANIFEST.mf
(Implementation-Version
)The text was updated successfully, but these errors were encountered: