jackrabbit-oak-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Julian Reschke (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (OAK-7511) get rid of JSR 305 dependency - use jetbrains nullability annotations instead
Date Thu, 02 Aug 2018 14:25:00 GMT

    [ https://issues.apache.org/jira/browse/OAK-7511?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16566866#comment-16566866
] 

Julian Reschke commented on OAK-7511:
-------------------------------------

For the record, potentially interesting for 1.8, there are two more ways to address the problem
which are less intrusive:

1) Deploy javax.annotation:javax.annotation-api:1.3.2  - thus the package dependency is fulfilled
(but the actual Nullability classes aren't there, but also aren't needed at runtime):
{noformat}
--- oak-it-osgi/pom.xml (revision 1837296)
+++ oak-it-osgi/pom.xml (working copy)
@@ -70,6 +70,11 @@

   <dependencies>
     <dependency>
+      <groupId>javax.annotation</groupId>
+      <artifactId>javax.annotation-api</artifactId>
+      <version>1.3.2</version>
+    </dependency>
+    <dependency>
       <groupId>org.apache.jackrabbit</groupId>
       <artifactId>oak-commons</artifactId>
       <version>${project.version}</version>
Index: oak-it-osgi/test-bundles.xml
===================================================================
--- oak-it-osgi/test-bundles.xml        (revision 1837296)
+++ oak-it-osgi/test-bundles.xml        (working copy)
@@ -28,6 +28,7 @@
       <outputFileNameMapping>${artifact.artifactId}.jar</outputFileNameMapping>
       <scope>test</scope>
       <includes>
+        <include>javax.annotation:javax.annotation-api</include>
         <include>javax.jcr:jcr</include>
         <include>com.google.guava:guava</include>
         <include>commons-codec:commons-codec</include>{noformat}

2. Make the import dependency optional, as done in Guava: <https://github.com/google/guava/blob/master/guava/pom.xml#L73>

See also discussions over in Sling around SLING-7798.
 

> get rid of JSR 305 dependency - use jetbrains nullability annotations instead
> -----------------------------------------------------------------------------
>
>                 Key: OAK-7511
>                 URL: https://issues.apache.org/jira/browse/OAK-7511
>             Project: Jackrabbit Oak
>          Issue Type: Task
>            Reporter: Julian Reschke
>            Assignee: Julian Reschke
>            Priority: Major
>              Labels: candidate_oak_1_8
>             Fix For: 1.10, 1.9.7
>
>         Attachments: OAK-7511.diff, convert-annotations.sh
>
>
> We should consider getting rid of the JSR 305 dependency (see <https://blog.codefx.org/java/jsr-305-java-9/>).



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message