Netcentric / accesscontroltool

Rights and roles management for AEM made easy
Eclipse Public License 1.0
150 stars 91 forks source link

Deploy to CQ5.6.1 fails due to AEM6 dependencies and Oak namespace #54

Closed cwoeltge closed 8 years ago

cwoeltge commented 8 years ago

Deploying the package to CQ5.6.1 fails with a namespace exception due Oak index definition package. Got that sorted but bundle dependencies point to AEM6 and the bundle won't start.

kwin commented 8 years ago

Closed with merging PR #55.

kwin commented 8 years ago

Actually there is still one incompatibility in the code: In https://github.com/Netcentric/accesscontroltool/blob/develop/accesscontroltool-bundle/src/main/java/biz/netcentric/cq/tools/actool/helper/AceWrapper.java#L127 we implement a JackrabbitAccessControlEntry.getRestrictions(String) method which was only implemented in jackrabbit-api 2.7.1 (https://issues.apache.org/jira/browse/JCR-3637). CQ 5.6.1 ships though with jackrabbit-api 2.6.2.

During bundle start there is no problem though, because for the change in JCR-3637 the package version has no been incremented correctly (it is version 2.3.0 with and without that newly added method). That is a violation of semantic versioning, therefore you can see the problem only during run time.

mtstv commented 8 years ago

Is it not the time now to start to split the code to different releases for 5.6.1, 6.0 (SP2, SP3), 6.1?

kwin commented 8 years ago

I want to prevent maintaining different branches of the code. Rather we should focus on providing compatibility with a reasonably old CQ version (which in this case is CQ 5.6.1). Maybe there is another solution which is compatible with AEM 6.1 as well as CQ 5.6.1 (maybe by getting rid of the ACEWrapper or by let that just embed the original JackrabbitAccessControlEntry).

cwoeltge commented 8 years ago

Actually, it should work on 5.6.1 - with proper Service Pack installed Jackrabbit API version is 2.7.5 - let's make SP2 the restriction (https://docs.adobe.com/content/docs/en/cq/5-6-1/release_notes_service_pack_2.html)

kwin commented 8 years ago

I agree. I will update the readme and the pom.xml accordingly then.

mtstv commented 8 years ago

I am not sure, but may be you can try to compile with uber-jar artefact to reduce the set of dependencies for AEM started from 6.0? https://repo.adobe.com/nexus/content/repositories/releases/com/adobe/aem/uber-jar/