[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
| 
[tycho-user] Uses constraint violation with javax.annotation
 | 
Hello,
I have a project requiring some JEE javax.annotation (1.2), so I have 
javax.annotation-api.jar in my target platform.
Some other 3rd-party jars like guava are also importing javax.annotation 
(optional and without version), but not JEE annotations, but jsr305 ones 
like Nullable.  In this case nullable annotations are not required in 
runtime,
but test cases executed by tycho randomly fail with "Uses constraint 
violation" complaining for 2 chains for javax.annotation (one wired from 
javax.annotation-api.jar and one wired from jdk8 through system bundle)
I tried to eliminate the chain coming from jdk (as jdk annotations are 
not required in runtime) using filtering
                        <filter>
                            <type>java-package</type>
                            <id>javax.annotation</id>
                            <restrictTo>
<type>p2-installable-unit</type>
<id>javax.annotation-api</id>
                            </restrictTo>
                        </filter>
But it does not seem to work I still have system bundle exporting 
javax.annotation and this random constraint violation failure.
How could I solve this ?
Arnaud