Index: src/main/java/org/apache/jackrabbit/filevault/maven/packaging/impl/AccessControlHandling.java
===================================================================
--- src/main/java/org/apache/jackrabbit/filevault/maven/packaging/impl/AccessControlHandling.java (nonexistent)
+++ src/main/java/org/apache/jackrabbit/filevault/maven/packaging/impl/AccessControlHandling.java (working copy)
@@ -0,0 +1,103 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jackrabbit.filevault.maven.packaging.impl;
+
+/**
+ * AccessControlHandling defines the behavior when importing
+ * access control nodes.
+ */
+public enum AccessControlHandling {
+
+ /**
+ * Ignores the packaged access control and leaves the target unchanged.
+ */
+ IGNORE,
+
+ /**
+ * Applies the access control provided with the package to the target. this
+ * also removes existing access control.
+ */
+ OVERWRITE,
+
+ /**
+ * Merge access control provided with the package with the one in the
+ * content by replacing the access control entries of corresponding
+ * principals (i.e. package first). It never alters access control entries
+ * of principals not present in the package.
+ *
+ * everyone, deny, jcr:all + * bob, allow, jcr:read + * bob, allow, jcr:write + *+ * + * Package ACL: + *
+ * bob, deny, jcr:all + * alice, allow, jcr:read + *+ * + * Result ACL: + *
+ * everyone, deny, jcr:all + * bob, deny, jcr:all + * alice, allow, jcr:read + *+ */ + MERGE, + + /** + * Merge access control in the content with the one provided with the + * package by adding the access control entries of principals not present in the + * content (i.e. content first). It never alters access control entries already + * existing in the content. + * + * + * Example:
+ * everyone, deny, jcr:all + * bob, allow, jcr:read + * bob, allow, jcr:write + *+ * + * Package ACL: + *
+ * bob, deny, jcr:all + * alice, allow, jcr:read + *+ * + * Result ACL: + *
+ * everyone, deny, jcr:all + * bob, allow, jcr:read + * bob, allow, jcr:write + * alice, allow, jcr:read + *+ */ + MERGE_PRESERVE, + + /** + * Clears all access control on the target system. + */ + CLEAR, + +} Property changes on: src/main/java/org/apache/jackrabbit/filevault/maven/packaging/impl/AccessControlHandling.java ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +LastChangedDate LastChangedRevision LastChangedBy HeadURL Id Author \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: src/main/java/org/apache/jackrabbit/filevault/maven/packaging/VaultMojo.java =================================================================== --- src/main/java/org/apache/jackrabbit/filevault/maven/packaging/VaultMojo.java (revision 1816417) +++ src/main/java/org/apache/jackrabbit/filevault/maven/packaging/VaultMojo.java (working copy) @@ -40,6 +40,7 @@ import javax.annotation.Nonnull; import org.apache.commons.io.IOUtils; +import org.apache.jackrabbit.filevault.maven.packaging.impl.AccessControlHandling; import org.apache.jackrabbit.filevault.maven.packaging.impl.DefaultWorkspaceFilter; import org.apache.jackrabbit.filevault.maven.packaging.impl.PackageType; import org.apache.jackrabbit.filevault.maven.packaging.impl.PathFilterSet; @@ -248,6 +249,43 @@ private boolean allowIndexDefinitions; /** + * Defines the AC handling. This will become the + * {@code acHandling} property of the properties.xml file.
ignore: Ignores the packaged access control and leaves the target unchanged.overwrite: Applies the access control provided with the package to the target. this also removes
+ * existing access control.merge: Merge access control provided with the package with the one in the content by replacing the
+ * access control entries of corresponding principals (i.e. package first). It never alters access control entries of
+ * principals not present in the package.merge_preserve: Merge access control in the content with the one provided with the package by
+ * adding the access control entries of principals not present in the content (i.e. content first). It never alters
+ * access control entries already existing in the content.clear: Clears all access control on the target system.