Adobe-Consulting-Services / acs-aem-commons

http://adobe-consulting-services.github.io/acs-aem-commons/
Apache License 2.0
455 stars 603 forks source link

Cannot build ACS Commons Sub Package with filevault-package-maven-plugin #1988

Closed jaydubb12 closed 5 years ago

jaydubb12 commented 5 years ago

Required Information

Archetype 19 Uber Jar version 6.5.1.0 ACS Common Dependency 4.2.0 Build Plug in causing issue - filevault-package-maven-plugin Error = Build profile throws error given allowIndexDefinitions" is by default set to false IDE = IntelliJ 2019.1.3 JDK = 1.8.0_202

Expected Behavior

ACS Commons feature would be able to be installed / built with the new version of the plugin, given it is currently being used with the default Archetype 19 and for the Core Component setup

        <plugin>
            <groupId>org.apache.jackrabbit</groupId>
            <artifactId>filevault-package-maven-plugin</artifactId>
            <extensions>true</extensions>
            <configuration>
                <filterSource>src/main/content/META-INF/vault/filter.xml</filterSource>
                <group>aem65</group>
                <properties>
                    <acHandling>merge</acHandling>
                </properties>
                <embeddeds>
                    <embedded>
                        <groupId>${project.groupId}</groupId>
                        <artifactId>aem65.aem65.core</artifactId>
                        <target>/apps/aem65/install</target>
                    </embedded>
                </embeddeds>
                <subPackages>
                    <subPackage>
                        <groupId>com.adobe.cq</groupId>
                        <artifactId>core.wcm.components.all</artifactId>
                        <filter>true</filter>
                    </subPackage>
                    <subPackage>
                        <groupId>com.adobe.cq</groupId>
                        <artifactId>core.wcm.components.examples</artifactId>
                        <filter>true</filter>
                    </subPackage>
                </subPackages>
            </configuration>
        </plugin>

Actual Behavior

Build compilation fails. User must leverage legacy configuration through content-package-maven-plugin.

Adding ACS Commons to a project using a subpackage in the filevalut packager causing the build to fail when allowIndexDefinitions=false

This was also briefly discussed herein as well - https://github.com/adobe/aem-project-archetype/issues/145

Steps to Reproduce

Attempt to implement ACS Commons dependency and plugin under "filevault-package-maven-plug in

justinedelson commented 5 years ago

This looks like a bug (or at least a misleading error message) in the filevault-package-maven-plugin since ACS AEM Commons doesn't contain index definitions. It does, however, contain an ACL on /oak:index.

That said, presumably you could just set allowIndexDefinitions to true.

https://jackrabbit.apache.org/filevault-package-maven-plugin/package-mojo.html#allowIndexDefinitions

kwin commented 5 years ago

Maybe this is related to https://issues.apache.org/jira/browse/JCRVLT-268.

jaydubb12 commented 5 years ago

@justinedelson I tried to set the allowIndexDefinitions to true, and the issues persisted. Also note, that for users who do not realize there is a change in Plug-ins for the Archetype 19, the documentation will prove misleading...so an update is likley needed

Note, there is also an issue when you attempt to install the assetshare.ui.apps features as well...as there is a compilation error, where it is looking for a MANIFEST.mf file; therefore in honesty, I cannot seem to get any of the ACS Commons features to work using the new plug-in, so I have reverted back, hence the defect ticket.

suchawla1989 commented 5 years ago

hi @justinedelson If this not an issue with ACS commons then is this something that could be raised as a JIRA at jackrabbit Filevault end ? Could you provide further insights on the same.

justinedelson commented 5 years ago

@suchawla1989 If the filevault-maven-plugin is erroring out with an error message saying that index definitions are not allowed but the package doesn't contain index definitions, that is clearly a problem with the plugin. Such an issue should be reported by the people running into the problem either directly to the Jackrabbit problem or to Adobe support. Adding more layers of indirection will only slow down the resolution process.

@jaydubb12 not sure what documentation you are referring to, but note that for ACS AEM Commons, documentation issues are separate: https://github.com/Adobe-Consulting-Services/adobe-consulting-services.github.io/issues.

kwin commented 5 years ago

I created https://issues.apache.org/jira/browse/JCRVLT-343 to track this.