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

Robert Munteanu commented on SLING-12452:
-----------------------------------------

Thanks for the context [~olli], I forgot about those topics. I think at this 
point we need to make a trade-off:
# either we have reduced dependencies but need to upgrade the bundle from time 
to time and support a smaller range of Oak versions with one Oak server release
# or we have extra dependencies (oak-lucene and oak-store-document) but support 
a wide range of Oak versions and hopefully don't need to touch the bundle for 
future Oak upgrades.

I slightly towards the second version because I don't want to come back to this 
bundle every now and then but I'm open to discussion. 

Perhaps there is an option to also embed the Preconditions class so that the 
bundle is self-contained. 

Also, if/when Oak will stop using Guava classes in LuceneIndexHelper then we 
could also build against a much newer Oak that does not use Guava so the 
inlining would be less problematic.

But typing this I wonder if it makes sense for the Oak Server bundle to 
explicitly create index definitions that refer to lucene without having the 
lucene bundle around.

> Investigate removing embeding of Oak classes
> --------------------------------------------
>
>                 Key: SLING-12452
>                 URL: https://issues.apache.org/jira/browse/SLING-12452
>             Project: Sling
>          Issue Type: Improvement
>          Components: Oak
>            Reporter: Robert Munteanu
>            Assignee: Robert Munteanu
>            Priority: Major
>             Fix For: JCR Oak Server 1.4.2
>
>         Attachments: oak-server-bnd-report.txt
>
>
> The current version of the oak-server bundle currently embeds two oak classes
> {noformat}$ jar tf target/org.apache.sling.jcr.oak.server-1.4.1-SNAPSHOT.jar  
> | grep -E 'jackrabbit.*class'
> org/apache/jackrabbit/oak/plugins/index/lucene/util/LuceneIndexHelper.class
> org/apache/jackrabbit/oak/plugins/index/search/util/IndexHelper.class
> {noformat}
> These classes seem to be responsible for pulling in the shaded Guava imports 
> which make upgrading to new Oak version harder.
> Using {{bnd print --full 
> target/org.apache.sling.jcr.oak.server-1.4.1-SNAPSHOT.jar}} I noticed the 
> following usage report
> {noformat}[USEDBY]
> (...)
> org.apache.jackrabbit.guava.common.base 
> org.apache.jackrabbit.oak.plugins.index.lucene.util
>                                         
> org.apache.jackrabbit.oak.plugins.index.search.util
> org.apache.jackrabbit.guava.common.collect 
> org.apache.jackrabbit.oak.plugins.index.search.util
> {noformat}
> If we could stop embedding the Oak classes the Guava imports should no longer 
> be required.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to