Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Build/Deploy System User Package

rahuls80678827
Level 3
Level 3

Is there a way to embed SystemUser package while building the bundle in maven?

Currently, I have created below zip package for system user and it's permission via acs and deploying this package (to other AEM instances) via Package Manager manually but I am looking for a way if we can make it automate via building/deploying the bundle or if there is any other way to make this as part of the automate process instead of doing it manually via Package Manager Console.

This question is coming from the background that in the current scenario, when we build the Content Package using "content-package-maven-plugin", first it builds the project (zip package) in target folder, then install from target folder to m2 repository and to AEM Package Manager. Logs are below -

[INFO] --- maven-install-plugin:2.5.2:install (default-install) @ key61-content ---

[INFO] Installing D:\Learning\Projects\key61\content\target\key61-content-1.0.0-SNAPSHOT.zip to C:\Users\RADHAG\.m2\repository\com\adobe\cq\key61-content\1.0.0-SNAPSHOT\key61-content-1.0.0-SNAPSHOT.zip

[INFO] --- content-package-maven-plugin:0.0.20:install (install-content-package) @ key61-content ---

[INFO] Installing key61-content (D:\Learning\Projects\key61\content\target\key61-content-1.0.0-SNAPSHOT.zip) to http://localhost:4504/crx/packmgr/service.jsp

I am looking for the same kind of approach for System User Package build and deployment. Is it possible?

Any help would be grateful.

1468157_pastedImage_0.png

1 Accepted Solution
Hemant_arora
Correct answer by
Level 8
Level 8

Yes its possible.

make a package of the /home/users/system

download the package

create a structure in your project /home/src/main/content

and add the extracted folders under content

add pom.xml in parallel to src folder and run mvn clean install

View solution in original post

6 Replies
Hemant_arora
Correct answer by
Level 8
Level 8

Yes its possible.

make a package of the /home/users/system

download the package

create a structure in your project /home/src/main/content

and add the extracted folders under content

add pom.xml in parallel to src folder and run mvn clean install

View solution in original post

rahuls80678827
Level 3
Level 3

Thankyou Hemant.

Can you also tell me how to package content/rep:policy node? Do I need to make a package of these two's or just the systemuser node?

/home/users/system/8m5Yl5qODqzl8wH_iZDV

/content/rep:policy

Hemant_arora
Level 8
Level 8

When we create our custom project using maven archetype, we see ui.content folder in that. So for rep:policy also make a package and extract it and copy the files/folder under jcr_root(extracted package) to ui.content/src/main/content/jcr_root/content

make sure you overwrite or merge ACL in pom.

rahuls80678827
Level 3
Level 3

Thankyou Hemant for your help. As per above suggestions, I am able to make the package now via Bundle Packaging process  and can see my 2 nodes in the zip package in Package Manager (which gets created as part of the Bundle Build/Deploy process).

/home/users/system/bG2D4jb7ZyDOAhbdUj4_

/content/rep:policy

I can see System User in CRX/DE bG2D4jb7ZyDOAhbdUj4_  at /home/users/system/

but rep:policy is not geting updated with new node "allow64" in my case.

/content/rep:policy

Regarding your comment "make sure you overwrite or merge ACL in pom." - Can you please share some snippet for this?

Hemant_arora
Level 8
Level 8

<configuration>
  
<properties>
  
<acHandling>Overwrite</acHandling>
  
</properties>
</configuration>

rahuls80678827
Level 3
Level 3

Thankyou for your help..

I have updated POM with

<properties>

       <acHandling>merge</acHandling>

</properties>

It's working fine now.