-
Notifications
You must be signed in to change notification settings - Fork 49
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
Check Android repository too #3605
Conversation
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.
@briandealwis I think this PR hacks around the bug but it's not the right answer yet. It logs lots of weird maven exceptions it shouldn't. Please do review and comment though.
Codecov Report
@@ Coverage Diff @@
## master #3605 +/- ##
============================================
- Coverage 70.23% 70.17% -0.06%
- Complexity 2990 2991 +1
============================================
Files 377 377
Lines 13552 13554 +2
Branches 1597 1598 +1
============================================
- Hits 9518 9512 -6
- Misses 3404 3410 +6
- Partials 630 632 +2
Continue to review full report at Codecov.
|
These errors look suspiciously like #3180. I suspect #3095 may play into it all too. I looked briefly at how m2e's MavenPomEditor's Dependency Hierarchy page resolves items. It calls code somewhat like the following: String classpath = Artifact.SCOPE_RUNTIME_PLUS_SYSTEM;
IMavenProjectFacade facade = MavenPlugin.getMavenProjectRegistry().getProject(pomFile.getProject());
DependencyNode root = MavenPlugin.getMavenModelManager().readDependencyTree(facade, mavenProject, classpath) |
I think #3180 and #3095 are symptoms, not causes. In all cases what we're seeing is a failure to find an artifact in Maven central. However there are different reasons that might be so. In this case the reason is simply that we're not checking the android repository. I'm now inclined to go ahead with this PR since it does fix the problem. There might be a better way, but so far I don't see it. |
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.
PTAL. I came up with a less invasive hack that looks for androidx (and only androidx) artifacts in the Google repo.
That didn't work (though it did locally). I May have to back it out. |
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.
Build failures were jsut an unused import I have now removed. Please review.
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.
At least this code is only intended for our libraries.
@briandealwis