Hi all,
I have one AEM project that has structure
<modules>
<module>all</module>
<module>core</module>
<module>ui.apps</module>
<module>ui.apps.structure</module>
<module>ui.config</module>
<module>ui.content</module>
</modules>
"all" module filevault-package-maven-plugin embedds core, ui.apps, ui.config and ui.content to install as a zip in package manager.
I have deployed this whole project as a zip packages in Github-Packages using "mvn deploy" command to private Github repository.
I am using this 1st AEM project as a maven dependency in 2nd fresh new AEM project but when I build the code it runs successfully, but my 1st projects' 4 packages are keep installing in a loop on package manager.
2nd Project main pom file has (fetching code successfully from private Github repo)
<dependency>
<groupId>com.pathfactory</groupId>
<artifactId>aem-connector-cloud.all</artifactId>
<version>1.0.1-SNAPSHOT</version>
<type>zip</type>
</dependency>
2nd Project "all" pom file has
<plugin>
<groupId>org.apache.jackrabbit</groupId>
<artifactId>filevault-package-maven-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<group>com.adobe.aem.guides</group>
<packageType>container</packageType>
<!-- skip sub package validation for now as some vendor packages like CIF apps will not pass -->
<skipSubPackageValidation>true</skipSubPackageValidation>
<embeddeds>
<embedded>
<groupId>com.adobe.aem.guides</groupId>
<artifactId>aem-guides-wknd.ui.apps</artifactId>
<type>zip</type>
<target>/apps/wknd-packages/application/install</target>
</embedded>
<embedded>
<groupId>com.adobe.aem.guides</groupId>
<artifactId>aem-guides-wknd.core</artifactId>
<target>/apps/wknd-packages/application/install</target>
</embedded>
<embedded>
<groupId>com.adobe.aem.guides</groupId>
<artifactId>aem-guides-wknd.ui.content</artifactId>
<type>zip</type>
<target>/apps/wknd-packages/content/install</target>
</embedded>
<embedded>
<groupId>com.adobe.aem.guides</groupId>
<artifactId>aem-guides-wknd.ui.config</artifactId>
<type>zip</type>
<target>/apps/wknd-packages/application/install</target>
</embedded>
<embedded>
<groupId>com.pathfactory</groupId>
<artifactId>aem-connector-cloud.all</artifactId>
<type>zip</type>
<target>/apps/aemconnector-packages/application/install</target>
</embedded>
</embeddeds>
</configuration>
</plugin>
Also I have added filters in "all" > filter.xml
<workspaceFilter version="1.0">
<filter root="/apps/wknd-packages"/>
<filter root="/apps/wknd-vendor-packages"/>
<filter root="/apps/aemconnector"/>
<filter root="/apps/aemconnector-packages"/>
<filter root="/apps/cq/core/content/nav"/>
</workspaceFilter>
My 1st project has RepoInit script to create user and assign ACL permissions,
scripts=[
"
create path /var/aemconnector/shared-assets/experience-fragments(sling:OrderedFolder)
create path /var/aemconnector/dynamic-configs(sling:OrderedFolder)
create path /var/aemconnector/sync-logs(sling:OrderedFolder)
create group aemconnector-service-group with path /home/groups/aemconnector
create service user aemconnector-content-user with forced path system/cq:services/aemconnector
set principal ACL for aemconnector-content-user
allow jcr:all on /content
allow jcr:all on /conf
allow jcr:all on /var
end
set principal ACL for aemconnector-service-group
allow jcr:all on /content
allow jcr:all on /conf
allow jcr:all on /var
end
create group aemconnector-administrator-group with path /home/groups/aemconnector
create group aemconnector-marketing-group with path /home/groups/aemconnector
add aemconnector-content-user to group aemconnector-service-group
"
]
Error
User is created but ACL permissions are not assigned correctly, I beleive this could be the issue for packages are installing in a loop.
Please help here if someone has used AEM project as a maven dependency and also creates user using RepoInit script.
Thanks in advance!
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
Hi @HitK ,
Can you try ensure principal ACL once to get the exact error as per doc https://sling.apache.org/documentation/bundles/repository-initialization.html
Thanks
I tried replcing "add principal" with "ensure principal" and also I had to change the aem-analyser version to 1.5.12 for successful build but It did not resolve the issue.
Error.log
*ERROR* [OsgiInstallerImpl] com.aemconnector.core.schedulers.AssetSyncScheduler Error in AssetSyncScheduler activate method
org.apache.sling.api.resource.LoginException: Cannot derive user name for bundle aem-connector-cloud.core [619] and sub service aemconnector-service
at org.apache.sling.resourceresolver.impl.ResourceResolverFactoryImpl.getServiceResourceResolver(ResourceResolverFactoryImpl.java:79) [org.apache.sling.resourceresolver:1.11.6]
My Mapping config file is as below,
{
"user.mapping": [
"aem-connector-cloud.core:aemconnector-service=[aemconnector-content-user]"
]
}
Instead of application can you please try container
<embedded>
<groupId>com.pathfactory</groupId>
<artifactId>aem-connector-cloud.all</artifactId>
<type>zip</type>
<target>/apps/aemconnector-packages/container/install</target>
</embedded>
thanks @aanchal-sikka for suggesting this, but even using the container did not fix the issue. packages are still installing in a loop
Views
Replies
Total Likes
Views
Likes
Replies