-
Notifications
You must be signed in to change notification settings - Fork 267
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
use-latest-versions or use-latest-releases changes versions to last version found in local repository, not in remote repo #677
Comments
This comment was marked as off-topic.
This comment was marked as off-topic.
"-U" option works only if local repository contain lower version, than remote repo. Otherwise it will not work as expected. |
Looking into |
The mojo always checks both local as well as all remote repositories. In this it follows the maven-compat library, which it currenty uses. The current maven-core library has the same behaviour in that regard. In that light, that it follows maven's behaviour, I don't think it's necessarily a bug. In your particular problem, perhaps the new options, See #454 |
I have the same problem. I need to build different versions of the project, so there are a lot of extra versions of dependencies locally. So far, the only workaround I've found is to first remove all versions of the dependencies I need from the local repository, and then use But I don't like this way. Is there a normal way to scan versions of a remote repository only? |
So basically something to be able to provide rules to disable repositories (here: local repo), but via command line, e.g. using user properties? |
Yes |
Now we use new Resolver API - we can check if we can provide a null or empty local repository for versions resolving. |
This issue is stale because it has been open 365 days with no activity. Remove stale label or comment or this will be closed in 30 days. |
When I use goals "use-latest-versions" or "use-latest-releases" it changes versions of dependencies to the last versions found in local repository (version from maven-metadata-local.xml file in dependency directory).
The same situation occurs, when I use "display-dependency-updates" goal, it also checks for versions in local repository first.
Is it normal behaviour of this goal or should it always check remote repository for updates?
It can lead to mistakes, for example if you have two projects:
In case I change locally version of dependency in core project to the HIGHER version than last version available in remote repository and do "maven install" in core project (what will make maven-metadata-local.xml file and create new dependency in .m2\repository), after using "use-latest-versions" it updates versions to these which has not been released and uploaded to remote repository.
That will lead to errors in builds, etc.
What I expect is that "use-latest-versions" or "use-latest-releases" will pull latest versions directly from remote repository and change them in pom.xml file.
Is it normal behaviour of this plugin or some kind of bug?
The text was updated successfully, but these errors were encountered: