[
https://issues.apache.org/jira/browse/SLING-6639?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15922831#comment-15922831
]
Karl Pauls commented on SLING-6639:
-----------------------------------
Well, the real problem is that both, engine and java-compiler are exporting the
org.apache.sling.scripting.sightly package!
The package bundled and exported by the engine contains the following classes:
ResourceResolution.java
SightlyException.java
and the java-complier contains:
Record.java
As they are both importing and exporting the same package only one can win and
both will see either the two classes bundled with the engine or the one class
bundled with the java-compiler, respectively. There are no split-packages in
OSGi - hence, that is clearly a mistake.
[~radu.cotescu], if you think the engine should be the one to provide the
org.apache.sling.scripting.sightly package we have to remove the export from
the java-compiler (I think all that is needed is to remove the package-info
file for that to happen) and probably move the Record.java into the engine?
At any rate, I think we should resolve this sooner rather than later as with
this set-up sightly will only work by accident (i.e., if the resolution order
favours the engine).
> Move ResourceResolution & SightlyException to java-compiler bundle
> ------------------------------------------------------------------
>
> Key: SLING-6639
> URL: https://issues.apache.org/jira/browse/SLING-6639
> Project: Sling
> Issue Type: Task
> Components: Scripting
> Reporter: Tomek Rękawek
> Fix For: Scripting HTL Engine 1.0.34, Scripting HTL Java Compiler
> 1.0.10
>
> Attachments: SLING-6639.patch
>
>
> {{ResourceResolution}} and {{SightlyException}} classes should be moved to
> the java-compiler bundle, as this is the one exporting
> {{org.apache.sling.scripting.sightly}} package. Right now they are the part
> of the engine bundle, which doesn't export anything and it may lead to issues
> if some bundle tries to use these two classes.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)