Skip to content
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

Incorrect implementation of org.codehaus.mojo.versions.CompareDependenciesMojo#getRemoteMavenProject method #1067

Closed
rimvydasv opened this issue Apr 12, 2024 · 2 comments · Fixed by #1164
Assignees
Labels

Comments

@rimvydasv
Copy link

CompareDependenciesMojo.java
Lines 260 - 266

ProjectBuildingResult result = projectBuilder.build(
remoteArtifact,
true,
PomHelper.createProjectBuilderRequest(
session,
r -> r.setProcessPlugins(false),
r -> r.setRemoteRepositories(session.getCurrentProject().getPluginArtifactRepositories())));

As far as I understand the last line should be:
r -> r.setRemoteRepositories(session.getCurrentProject().getRemoteArtifactRepositories())));

@slawekjaranowski
Copy link
Member

You can try to change implementation - and we see if ITs pass.

You can also add a specific IT which discover your problem.

We can also build set of getPluginArtifactRepositories and getRemoteArtifactRepositories and pass it as remote repositories

@andrzejj0 andrzejj0 added the bug label Oct 24, 2024
@andrzejj0 andrzejj0 self-assigned this Oct 24, 2024
@andrzejj0
Copy link
Contributor

andrzejj0 commented Oct 24, 2024

I think it's an obvious mistake. We would probably not see it in our integration tests since they use the same repo for plugins and artifacts. A separate it settings.xml could be created just for that, or some unit test specifically for this case, but is it is just an obvious error -- mea culpa.

andrzejj0 added a commit to andrzejj0/versions-maven-plugin that referenced this issue Oct 24, 2024
andrzejj0 added a commit to andrzejj0/versions-maven-plugin that referenced this issue Oct 24, 2024
…MavenProject, likewise in DisplayPluginUpdatesMojo::getPluginProject
andrzejj0 added a commit that referenced this issue Oct 25, 2024
…ject, likewise in DisplayPluginUpdatesMojo::getPluginProject (#1164)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants