File tree Expand file tree Collapse file tree 3 files changed +26
-0
lines changed
src/main/java/org/apache/maven/plugins/assembly Expand file tree Collapse file tree 3 files changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -223,4 +223,12 @@ public interface AssemblerConfigurationSource {
223223 * @return Override group name.
224224 */
225225 String getOverrideGroupName ();
226+
227+ /**
228+ * @return mask which is applied to permissions of files/directories before they are put into assembly.
229+ * If {@code null} then the mask is not explicitly configured and remains implementation-specific.
230+ */
231+ default Integer getOverrideUmask () {
232+ return null ;
233+ }
226234}
Original file line number Diff line number Diff line change @@ -347,6 +347,10 @@ protected Archiver createArchiver(
347347 if (StringUtils .isNotBlank (configSource .getOverrideGroupName ())) {
348348 archiver .setOverrideGroupName (StringUtils .trim (configSource .getOverrideGroupName ()));
349349 }
350+ final Integer overrideUmask = configSource .getOverrideUmask ();
351+ if (overrideUmask != null ) {
352+ archiver .setUmask (overrideUmask );
353+ }
350354
351355 return archiver ;
352356 }
Original file line number Diff line number Diff line change @@ -430,6 +430,15 @@ public abstract class AbstractAssemblyMojo extends AbstractMojo implements Assem
430430 @ Parameter
431431 private String overrideGroupName ;
432432
433+ /**
434+ * Override of mask which is applied to permissions of files/directories before they are put into assembly.
435+ * If {@code null} then the mask is not explicitly configured and remains implementation-specific.
436+ * If invalid value is specified - like negative value - then behaviour is implementation specific, i.e. depends
437+ * on underlying library which is used for building of assembly.
438+ */
439+ @ Parameter
440+ private Integer overrideUmask ;
441+
433442 public static FixedStringSearchInterpolator mainProjectInterpolator (MavenProject mainProject ) {
434443 if (mainProject != null ) {
435444 // 5
@@ -879,4 +888,9 @@ public Integer getOverrideGid() {
879888 public String getOverrideGroupName () {
880889 return this .overrideGroupName ;
881890 }
891+
892+ @ Override
893+ public Integer getOverrideUmask () {
894+ return this .overrideUmask ;
895+ }
882896}
You can’t perform that action at this time.
0 commit comments