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

Remove <repositories> from POMs #1809

Closed
tbroyer opened this issue Sep 4, 2020 · 2 comments · Fixed by #2063
Closed

Remove <repositories> from POMs #1809

tbroyer opened this issue Sep 4, 2020 · 2 comments · Fixed by #2063

Comments

@tbroyer
Copy link
Contributor

tbroyer commented Sep 4, 2020

Description of the problem / feature request:

The error_prone_core POM contains a <repository>, which shouldn't be needed but will be inherited by users' builds (in Maven, not Gradle; don't know about other build tools)

Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

The error was reported on the gradle-errorprone-plugin issue tracker: tbroyer/gradle-errorprone-plugin#47, I don't have more information (user seems to be Chinese, so it might be related to the Great Firewall, or it could be something entirely different), but having declared <repositories> in published POMs is not a good practice.

What version of Error Prone are you using?

The repository is present in the 2.4.0 POM, and many previous versions: https://search.maven.org/artifact/com.google.errorprone/error_prone_core/2.4.0/jar

Have you found anything relevant by searching the web?

The repository was added 8 years ago in 2550253, apparently because com.google.code.findbugs:jsr305:2.0.1 was not available in Central.
According to https://search.maven.org/artifact/com.google.code.findbugs/jsr305, it was there already at the time though, so this repository shouldn't even have been added to begin with, but here we are.

I suggest removing those lines from the POM and confirm that the project still build correctly (even from a clean state / empty local repository).

@albanyqq
Copy link

albanyqq commented Sep 4, 2020

Yes,i'm come from china .
but because of the my company regulations,I can't connect to the external network inside the company.So that's the problem
I have to modify the warehouse address, To be able to download dependencies.

@tbroyer
Copy link
Contributor Author

tbroyer commented Sep 4, 2020

That helps understand how to possibly reproduce the issue, thanks.

BTW, if you have an internal repository, then you probably should setup a mirror in your Maven settings.xml with <mirrorOf>*</mirrorOf>: https://maven.apache.org/guides/mini/guide-mirror-settings.html (or set one up for each repository you want to mirror, explicitly, as I suggested in tbroyer/gradle-errorprone-plugin#47, depending on your corporate policy)

copybara-service bot pushed a commit that referenced this issue Jan 6, 2021
Fixes #1809

PiperOrigin-RevId: 350411219
stevie400 pushed a commit to HubSpot/error-prone that referenced this issue Jan 15, 2021
Fixes google#1809

PiperOrigin-RevId: 350419816
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants