ACS AEM Commons is not installable in AEM 6.5.8 due to missing dependency day/cq60/product:cq-content:6.3.64 (6.5.16 is installed instead)

3
closed
henrykuijpers
henrykuijpers
Posted 1 year ago

ACS AEM Commons is not installable in AEM 6.5.8 due to missing dependency day/cq60/product:cq-content:6.3.64 (6.5.16 is installed instead) #2566

Required Information

  • AEM Version: 6.5.8
  • ACS AEM Commons Version: 5.0.4
  • Reproducible on Latest? yes

We're embedding the ACS AEM Commons release in our deployment, so that it gets deployed to our instances. We're using the following configuration for that:

        <!-- ACS commons dependencies -->
        <dependency>
            <groupId>com.adobe.acs</groupId>
            <artifactId>acs-aem-commons-content</artifactId>
            <type>content-package</type>
            <classifier>min</classifier>
            <version>${acs-aem-commons.version}</version>
        </dependency>

<!-- And in filevault-package-maven-plugin: -->

                        <subPackage>
                            <groupId>com.adobe.acs</groupId>
                            <artifactId>acs-aem-commons-content</artifactId>
                            <classifier>min</classifier>
                            <filter>true</filter>
                        </subPackage>

It seems that the version range that is mentioned over here: https://github.com/Adobe-Consulting-Services/acs-aem-commons/blob/2e3c72567cbfc9ed2bed867ade439194f0927cbd/ui.apps/pom.xml#L89 doesn't translate to a version range inside the ui.apps content-package, which then makes the installation in AEM failed, because we don't have cq-content 6.3.64, but 6.5.16 (AEM 6.5.8).

FYI: The generated properties.xml contains: <entry key="dependencies">day/cq60/product:cq-content:6.3.64</entry> Which, I think, should have indicated a version range instead?

Or the issue is in the filevault functionality inside AEM: That checks for the exact version of 6.3.64 being installed, while we have 6.5.16. Maybe that should instead check for a minimal version of 6.3.64?

Expected Behavior

When installing in AEM, the ACS AEM Commons content package and all of its sub-packages (content, ui.apps, ..) get installed properly.

Actual Behavior

When installing in AEM, the ACS AEM Commons content package gets installed, but the ui.apps package is refused installation:

Starting installation of subpackage adobe/consulting:acs-aem-commons-ui.apps:5.0.4
Error during processing.
org.apache.jackrabbit.vault.packaging.DependencyException: Refusing to install package adobe/consulting:acs-aem-commons-ui.apps:5.0.4. required dependencies missing: [day/cq60/product:cq-content:6.3.64]
at

Steps to Reproduce

  • Start AEM 6.5
  • Install SP8
  • Restart(?)
  • Install acs-aem-commons-content
  • Notice that the filevault bundle inside AEM refuses to install the ui.apps package, due to the missing dependency
kwin
kwin
Created 1 year ago

The generated package property looks wrong to me (i.e. is no version range, only matches exactly AEM 6.3), gonna investigate if this is a bug with the filevault-package-maven-plugin.

Update: I was wrong here, one version matches everything starting from this version, as also outlined in https://jackrabbit.apache.org/filevault-package-maven-plugin/generate-metadata-mojo.html#dependencies

kwin
kwin
Created 1 year ago

This behaviour is coming from https://github.com/apache/jackrabbit-filevault/blob/448660b925c199a865f27e2d145c5db33e0f5830/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/VersionRange.java#L93. But it is deliberate as the check in VersionRange.fromString("6.3.64").isInRange(Version.create("6.5.16") returns true. So you can leave out the upper bound if it is unlimited (it implicitly means, everything above the given version is fine as well). To restrict to one version only you have to give it as <version>[6.3.64,6.3.64]</version> . I checked in AEM Cloud Quickstart and there the dependency is day/cq60/product:cq-content:6.3.64 is resolved by day/cq60/product:cq-content:6.5.40. So something must be either fishy in your instance or is a bug in AEM 6.5.8.

henrykuijpers
henrykuijpers
Created 1 year ago

@kwin It was indeed an issue in one of our local systems. Somehow, loads of packages had been removed, due to which the ACS Commons package installation was not able to find the cq-content content-package. We restored the packages inside /etc/packages and now it is working fine.