mavenaemslingsdi

When including Sling Dynamic Include in our our maven pom, it is not installing the jar


We have a bit of a problem installing SDI via maven packaging.

We followed the install guide found at: https://github.com/Cognifide/Sling-Dynamic-Include

We have placed the dependency into our core bundle in our project, and it appears as though sling-dynamic-include-1.0.0.jar is included in our core bundle's jar files, and the rest seem to install, however, no configurations appear in the system/console interface, and it doesn't appear as though there is any reference to it inside the console otherwise.

We have checked the packages through /system/console/depfinder, and can't find any reference to it.

It's fairly safe to say that the jar file is not being loaded into CQ5.

If we manually install the jar, everything is there, however, we need to integrate it into mvn.

I am sure we are missing something basic, and any help would be appreciated.


Solution

  • Adding to the maven dependencies is not enough.

    You have to copy the jar into the install folder of your crx package.

    If you use maven-vault-plugin, you can add it as embedded element.

    <configuration>
     <embeddedTarget>/apps/your-app/install</embeddedTarget>
     <embeddeds>
       <embedded>
        <groupId>com.cognifide.cq</groupId>
        <artifactId>sling-dynamic-include</artifactId>
        <filter>true</filter>
       </embedded>
     </embeddeds>
    </configuration>
    

    It will copy it to the install folder.