I updated my maven pom with the dependency:. But why would I have to add this dependency to my pom if guava already depends on it? From the maven website they state the following with regards to provided dependencies: Sign up using Email and Password. But the issue is very close to mine This looks more to a workaround than to a solution, and I would prefer to understand and make things clean.
Uploader: | Arashishicage |
Date Added: | 24 September 2012 |
File Size: | 43.9 Mb |
Operating Systems: | Windows NT/2000/XP/2003/2003/7/8/10 MacOS 10/X |
Downloads: | 84931 |
Price: | Free* [*Free Regsitration Required] |
So basically because Jaf have set this as a provided dependency they expect whoever is consuming Guava to provide this dependency which is exactly what you have had to do.
Download jsr-305.jar : jsr « j « Jar File Download
So I'm confused about this whole deal related to runtime retention. Unicorn Meta Zoo 9: See for example stackoverflow.
jqr Made findbugs a provided dependency to avert dep conflicts when using findbugs 2. The reason that you need to add it as a dependency is because Guava 14 defines the dependency in their pom as follows: From the release notes:. The change was made in Guava If you were using JSR annotations in your own code, then yeah, you need to depend on it directly now to compile.
Stack Overflow works best with JavaScript enabled. By using our site, you acknowledge that you have read and understand our Cookie PolicyPrivacy Policyand our Terms of Service.
Download gs JAR files with all dependencies
The side-effect jad this change is that projects which relied upon Guava to grant access to the JSR annotations "for free" will break unless they provide their own direct dependency on that jar or an equivalent.
I seem to recall that this is necessary when using the Scala compiler - is that your setup?

You still shouldn't need it at runtime unless you're doing reflection on the annotations for some reason. In my case, I need it at runtime, so DB5 answer fits to me.
From the maven website they state the following with regards to provided dependencies: What I find strange is that guava 14 also depends on JSR as mvn repository reports. I took a look closer, and this annotations is provided with JSRon which depends guava This looks more to a workaround than to a solution, and I would prefer to understand and make things clean.
From the maven website they state the following with regards to provided dependencies:.
You can try this yourself - create a clean project only with Guava and without JSR If I include Guava as a dependency in my application, yet I don't include jsr as a dependency, if I use reflection on my code do I run the risk of an exception being thrown because a method indicates that it uses the Nonnull annotation for example, yet jsr was not included in the binary? I need migrating my maven project from guava But why would I have to add this dependency to my pom if guava already depends on it?
Sign up using Email msr305 Password. But the issue is very close to mine Sign jae or log in Sign up using Google.

I updated my maven pom with the dependency:. This scope is only available on the compilation and test classpath, and is not jsr35. Stack Overflow for Teams is a private, secure spot for you and your coworkers to find and share information. That's not my setup, since I build a java project.
Download jsr305-1.3.9.jar : jsr305 « j « Jar File Download
Everything will work fine in Java at least in Java 7, not sure about Java 8. With Scala, though, this is a different song and you are right.
Sign up using Facebook. DB5 DB5 11k 4 4 gold badges 50 50 silver badges 61 61 bronze msr305. Post as a guest Name. Active 4 years, 3 months ago.
No comments:
Post a Comment