-
Notifications
You must be signed in to change notification settings - Fork 854
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
Provide an artifact that shades or omits Guava and other dependencies #20
Comments
Why does the JAR include its dependencies at all? That's not the way JARs usually work. If it is necessary, can you create a new JAR, |
Incidentally, FreeBuilder uses google-java-format without issue, because it does its own shading; there's no reason Dagger can't do the same, beyond the effort involved. But this issue should still be fixed, because otherwise processorpath ordering can silently downgrade Guava for your users. |
It doesn't include the dependencies, but the |
@cpovirk [maven doc] It's not the easiest to read (so much xml to parse...) but it seems like you can force a version to be used via the parent pom.xml's |
@ronshapiro Yes it does! (note: the maven-shade-plugin is declared in the parent POM)
|
Ah, my mistake, I was looking at -sources.jar. Thanks @tbroyer for the correction |
The fat jar was supposed to be for command line use, I agree it's a bad idea for the artifact we publish to maven. (And I updated google-java-format to use guava 19.) |
Use maven-assembly-plugin then to publish an all-deps jar as an attached artifact? |
Any concerns with #21? |
Can this be released? |
…t bundling but not relocating their copy of guava, which affected 2.3. The issue is no longer there, and the tests should fail if it regresses. relates to #288 and was partly resolved by google/google-java-format#20 and depending on the newer released (unshaded) formatter. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=120469748
…t bundling but not relocating their copy of guava, which affected 2.3. The issue is no longer there, and the tests should fail if it regresses. relates to #288 and was partly resolved by google/google-java-format#20 and depending on the newer released (unshaded) formatter. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=120469748
As noted in google/dagger#228 (comment) and the comment it replies to, the
google-java-format
jar contains classes from Guava and other dependencies. Those classes end up in Dagger, where they conflict with the version of Guava used by Dagger -- and, because of Maven's lack of support for-processorpath
, with the version of Guava used by Dagger users like Caliper.I don't know enough about Maven to say what the right thing here is. The easiest thing, I'd guess, is shading, but for all I know, this may be difficult with the Eclipse classes for some reason.
The text was updated successfully, but these errors were encountered: