adobe / aem-project-archetype

Maven template to create best-practice websites on AEM.
https://experienceleague.adobe.com/docs/experience-manager-core-components/using/developing/archetype/overview.html
Apache License 2.0
544 stars 418 forks source link

Unable to define system users within the ui.content module #706

Open maciusio opened 3 years ago

maciusio commented 3 years ago

Expected Behaviour

It's a common case that one wants to create a system user and deploy it to all the environments with a package.

I should be able to define system users in the ui.content module.

Actual Behaviour

After adding nodes containing system users, the build fails with errors

Reproduce Scenario (including but not limited to)

Generate project with the latest archetype e.g: mvn -B archetype:generate -D archetypeGroupId=com.adobe.aem -D archetypeArtifactId=aem-project-archetype -D archetypeVersion=27 -D aemVersion=6.5.7 -D appTitle='my app' -D appId=platform -D groupId=my.app -D includeExamples=n

Inside the ui.content package add a system user node e.g. <?xml version="1.0" encoding="UTF-8"?> <jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:rep="internal" jcr:primaryType="rep:SystemUser" jcr:uuid="2018c732-1e79-3c1e-88b3-de3ce2ceee41" rep:authorizableId="dam-writer-service" rep:principalName="dam-writer-service"/>

Logs taken while reproducing problem

[ERROR] ValidationViolation: "jackrabbit-nodetypes: Property 'rep:authorizableId' [String] is not allowed in node with types [rep:SystemUser]: Property is protected!", filePath=jcr_root/home/users/system//.content.xml, nodePath=/home/users/system/, line=6, column=42 [ERROR] ValidationViolation: "jackrabbit-nodetypes: Property 'rep:principalName' [String] is not allowed in node with types [rep:SystemUser]: Property is protected!", filePath=jcr_root/home/users/system//.content.xml, nodePath=/home/users/system/, line=6, column=42

venky1311 commented 2 years ago

Getting the similar issue, any solution ?

agankitgupta1 commented 1 month ago

Any Solution?

ankit2-gupta commented 1 month ago

I got the solution.

Remove the version of filevault-package-maven-plugin mentioned in pom.xml or update it to the latest one. In my case, I removed 1.1.6.