question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Dependency version check fails even if required is "*"

See original GitHub issue

Hi!

During the development, I don’t have a version set, and every plugin has “unspecified” as a version. Since I do not define any contains on the version, I would expect that it will pass and won’t even try to parse the provided version.

However, it seems that the parsing kicks in too early: https://github.com/pf4j/pf4j/blob/f1dcdf8920f96f5dbb8515aeec402e9d3d7562c4/pf4j/src/main/java/org/pf4j/DefaultVersionManager.java#L42

My suggestion would be to add a check if the constraint is * and always return true.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
decebalscommented, Feb 13, 2020

@bsideup

I will take a look. Until then you can supply your VersionManager custom implementation to the plugin manager via factory method DefaultPluginManager.createVersionManager. Your custom version manager implementation is very simple, just extends DefaultPluginManager.checkVersionConstraint (put your if test in front of default implementation).

0reactions
decebalscommented, Jan 22, 2022

Closed with #451.

Read more comments on GitHub >

github_iconTop Results From Across the Web

'dependencies.dependency.version' is missing error, but ...
Clear your .m2 cache normally located C:\Users\user.m2\repository. I would say I do this pretty frequently when I'm working in maven.
Read more >
RFC: Check and fail on non-required dependencies ... - GitHub
AFAICS, in order to fail if a non-required dependency is missing, dependency.found() has to be called and then raise the error by calling ......
Read more >
Understanding dependency resolution - Gradle User Manual
Dependency resolution will fail if the required artifacts are not available in any repository specified by the build, even if the local cache...
Read more >
Go Modules Reference - The Go Programming Language
Canonical versions are required outside the main module, and the go command will report an error if a non-canonical version like master appears...
Read more >
Maven Error: Failed to collect dependencies - When trying to ...
It's possible your dependencies are corrupted in your local maven cache, you could try forcing an update of the maven dependency cache -...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found