Reputation: 8275
I have a build time dependency on the package javax.annotation[2.0,3)
. That's because I use Guava and the @Nullable
annotation in some Predicate
implementations.
These, being annotations, are just build time dependencies, so is it acceptable to mark them as optional, and not include them in my run time distribution (to save space where possible)?
Import-Package: javax.annotation;resolution:=optional;version="[2.0,3)"
Upvotes: 1
Views: 106
Reputation: 19626
That should work fine. You can alternatively completely omit the import.
Upvotes: 2