-
Notifications
You must be signed in to change notification settings - Fork 308
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
Fix issues with querying Maven artifacts from different repositories #6489
Conversation
acd6347
to
f0ddcea
Compare
66068db
to
af583bf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved, but it looks like there are more expected test results you need to update.
The failing test pass for me locally (also see my message on Slack). Would you mind checking whether |
On CI, I for example see
being used instead of
|
8cddd27
to
30a6dd0
Compare
Yes, tests pass locally. |
As I'm totally clueless by now, I've filed actions/setup-java#454. |
Did you already try to clear the settings.xml after the setup-java task? |
Not after |
719717d
to
eb918e8
Compare
1c6b117
to
56802f8
Compare
analyzer/src/test/kotlin/managers/utils/MavenDependencyHandlerTest.kt
Outdated
Show resolved
Hide resolved
Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
Consider artifact repositories declared in POMs with lowest priority for Maven (see [1]) and not at all for Gradle (see [2]). Adjust the expected results for affected tests accordingly. E.g. `multi-kotlin-project` indeed only declares JCenter as a repository [3]. Fixes #6488. [1]: https://maven.apache.org/guides/mini/guide-multiple-repositories.html#repository-order [2]: https://docs.gradle.org/current/userguide/declaring_repositories.html#strict_limitation_to_declared_repositories [3]: https://github.com/oss-review-toolkit/ort/blob/f6c9386/analyzer/src/funTest/assets/projects/external/multi-kotlin-project/build.gradle.kts#L13 Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
Previously, the cache for the remote artifacts only used the artifact coordinates as the cache key. But if the list of repos to query changes, there may be another match for the same artifact in another repo. Thus, also take the list of repos into account for the cache key. Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
The comment was no in-line with the code anyway, so address this by avoiding the outer condition for the log level completely. Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
56802f8
to
4879ca5
Compare
Please have a look at the individual commit messages for the details.