View Javadoc
1   package org.apache.maven.plugin.assembly.mojos;
2   
3   /*
4    * Licensed to the Apache Software Foundation (ASF) under one
5    * or more contributor license agreements.  See the NOTICE file
6    * distributed with this work for additional information
7    * regarding copyright ownership.  The ASF licenses this file
8    * to you under the Apache License, Version 2.0 (the
9    * "License"); you may not use this file except in compliance
10   * with the License.  You may obtain a copy of the License at
11   *
12   *   http://www.apache.org/licenses/LICENSE-2.0
13   *
14   * Unless required by applicable law or agreed to in writing,
15   * software distributed under the License is distributed on an
16   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17   * KIND, either express or implied.  See the License for the
18   * specific language governing permissions and limitations
19   * under the License.
20   */
21  
22  import java.io.File;
23  import java.util.Collections;
24  import java.util.List;
25  
26  import org.apache.maven.archiver.MavenArchiveConfiguration;
27  import org.apache.maven.artifact.repository.ArtifactRepository;
28  import org.apache.maven.execution.MavenSession;
29  import org.apache.maven.plugin.AbstractMojo;
30  import org.apache.maven.plugin.MojoExecutionException;
31  import org.apache.maven.plugin.MojoFailureException;
32  import org.apache.maven.plugin.assembly.AssemblerConfigurationSource;
33  import org.apache.maven.plugin.assembly.InvalidAssemblerConfigurationException;
34  import org.apache.maven.plugin.assembly.archive.ArchiveCreationException;
35  import org.apache.maven.plugin.assembly.archive.AssemblyArchiver;
36  import org.apache.maven.plugin.assembly.format.AssemblyFormattingException;
37  import org.apache.maven.plugin.assembly.io.AssemblyReadException;
38  import org.apache.maven.plugin.assembly.io.AssemblyReader;
39  import org.apache.maven.plugin.assembly.model.Assembly;
40  import org.apache.maven.plugin.assembly.utils.AssemblyFormatUtils;
41  import org.apache.maven.plugin.logging.Log;
42  import org.apache.maven.plugins.annotations.Component;
43  import org.apache.maven.plugins.annotations.Parameter;
44  import org.apache.maven.project.MavenProject;
45  import org.apache.maven.project.MavenProjectHelper;
46  import org.apache.maven.shared.filtering.MavenFileFilter;
47  import org.codehaus.plexus.configuration.PlexusConfiguration;
48  
49  /**
50   * @author <a href="mailto:brett@apache.org">Brett Porter</a>
51   * @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
52   * @version $Id: AbstractAssemblyMojo.java 1601216 2014-06-08 11:58:09Z khmarbaise $
53   * @threadSafe
54   */
55  public abstract class AbstractAssemblyMojo
56      extends AbstractMojo
57      implements AssemblerConfigurationSource
58  {
59      /**
60       * The character encoding scheme to be applied when filtering resources.
61       */
62      @Parameter( property = "encoding", defaultValue = "${project.build.sourceEncoding}" )
63      protected String encoding;
64  
65      /**
66       * Expressions preceded with this String won't be interpolated.
67       * If you use "\" as the escape string then \${foo} will be replaced with ${foo}.
68       *
69       * @since 2.4
70       */
71      @Parameter( property = "assembly.escapeString" )
72      protected String escapeString;
73  
74      /**
75       * Flag allowing one or more executions of the assembly plugin to be configured as skipped for a particular build.
76       * This makes the assembly plugin more controllable from profiles.
77       */
78      @Parameter( property = "assembly.skipAssembly", defaultValue = "false" )
79      private boolean skipAssembly;
80  
81      /**
82       * If this flag is set, everything up to the call to Archiver.createArchive() will be executed.
83       */
84      @Parameter( property = "assembly.dryRun", defaultValue = "false" )
85      private boolean dryRun;
86  
87      /**
88       * If this flag is set, the ".dir" suffix will be suppressed in the output directory name when using assembly/format
89       * == 'dir' and other formats that begin with 'dir'. <br/>
90       * <b>NOTE:</b> Since 2.2-beta-3, the default-value for this is true, NOT false as it used to be.
91       */
92      @Parameter( defaultValue = "true" )
93      private boolean ignoreDirFormatExtensions;
94  
95      /**
96       * Local Maven repository where artifacts are cached during the build process.
97       */
98      @Parameter( defaultValue = "${localRepository}", required = true, readonly = true )
99      private ArtifactRepository localRepository;
100 
101     /**
102      */
103     @Parameter( defaultValue = "${project.remoteArtifactRepositories}", required = true, readonly = true )
104     private List<ArtifactRepository> remoteRepositories;
105 
106     /**
107      * Contains the full list of projects in the reactor.
108      */
109     @Parameter( defaultValue = "${reactorProjects}", required = true, readonly = true )
110     private List<MavenProject> reactorProjects;
111 
112     /**
113      * The output directory of the assembled distribution file.
114      */
115     @Parameter( defaultValue = "${project.build.directory}", required = true )
116     private File outputDirectory;
117 
118     /**
119      * The filename of the assembled distribution file.
120      */
121     @Parameter( defaultValue = "${project.build.finalName}", required = true )
122     private String finalName;
123 
124     /**
125      * Directory to unpack JARs into if needed
126      */
127     @Parameter( defaultValue = "${project.build.directory}/assembly/work", required = true )
128     private File workDirectory;
129 
130     /**
131      * Specifies the formats of the assembly.
132      * Multiple formats can be supplied and the Assembly Plugin will generate an archive for each desired formats.
133      * When deploying your project, all file formats specified will also be deployed. A format is specified by supplying one of the following
134      * values in a &lt;format&gt; subelement:
135      * <ul>
136      * <li><em>dir</em> - Creates a directory</li>
137      * <li><em>zip</em> - Creates a ZIP file format</li>
138      * <li><em>tar</em> - Creates a TAR format</li>
139      * <li><em>tar.gz</em> - Creates a gzip'd TAR format</li>
140      * <li><em>tar.bz2</em> - Creates a bzip'd TAR format</li>
141      * </ul>
142      */
143     @Parameter
144     private List<String> formats;
145 
146     /**
147      * This is the artifact classifier to be used for the resultant assembly artifact. Normally, you would use the
148      * assembly-id instead of specifying this here.
149      *
150      * @deprecated Please use the Assembly's id for classifier instead
151      */
152     @Deprecated
153     @Parameter( property = "classifier" )
154     private String classifier;
155 
156     /**
157      * A list of descriptor files to generate from.
158      */
159     @Parameter
160     private String[] descriptors;
161 
162     /**
163      * A list of references to assembly descriptors available on the plugin's classpath. The default classpath
164      * includes these built-in descriptors: <code>bin</code>,
165      * <code>jar-with-dependencies</code>, <code>src</code>, and
166      * <code>project</code>. You can add others by adding dependencies
167      * to the plugin.
168      */
169     @Parameter
170     private String[] descriptorRefs;
171 
172     /**
173      * Directory to scan for descriptor files in. <b>NOTE:</b> This may not work correctly with assembly components.
174      */
175     @Parameter
176     private File descriptorSourceDirectory;
177 
178     /**
179      * This is the base directory from which archive files are created. This base directory pre-pended to any
180      * <code>&lt;directory&gt;</code> specifications in the assembly descriptor. This is an optional parameter.
181      */
182     @Parameter
183     private File archiveBaseDirectory;
184 
185     /**
186      * Predefined Assembly Descriptor Id's. You can select bin, jar-with-dependencies, or src.
187      *
188      * @deprecated Please use descriptorRefs instead
189      */
190     @Deprecated
191     @Parameter( property = "descriptorId" )
192     protected String descriptorId;
193 
194     /**
195      * Assembly XML Descriptor file. This must be the path to your customized descriptor file.
196      *
197      * @deprecated Please use descriptors instead
198      */
199     @Deprecated
200     @Parameter( property = "descriptor" )
201     protected String descriptor;
202 
203     /**
204      * Sets the TarArchiver behavior on file paths with more than 100 characters length. Valid values are: "warn"
205      * (default), "fail", "truncate", "gnu", or "omit".
206      */
207     @Parameter( property = "assembly.tarLongFileMode", defaultValue = "warn" )
208     private String tarLongFileMode;
209 
210     /**
211      * Base directory of the project.
212      */
213     @Parameter( defaultValue = "${project.basedir}", required = true, readonly = true )
214     private File basedir;
215 
216     /**
217      * Maven ProjectHelper.
218      */
219     @Component
220     private MavenProjectHelper projectHelper;
221 
222     /**
223      * Maven shared filtering utility.
224      */
225     @Component
226     private MavenFileFilter mavenFileFilter;
227 
228     /**
229      * The Maven Session Object
230      */
231     @Component
232     private MavenSession mavenSession;
233 
234     /**
235      * Temporary directory that contain the files to be assembled.
236      */
237     @Parameter( defaultValue = "${project.build.directory}/archive-tmp", required = true, readonly = true )
238     private File tempRoot;
239 
240     /**
241      * Directory for site generated.
242      */
243     @Parameter( defaultValue = "${project.reporting.outputDirectory}", readonly = true )
244     private File siteDirectory;
245 
246     /**
247      * Set to true to include the site generated by site:site goal.
248      *
249      * @deprecated Please set this variable in the assembly descriptor instead
250      */
251     @Deprecated
252     @Parameter( property = "includeSite", defaultValue = "false" )
253     private boolean includeSite;
254 
255     /**
256      * Set to false to exclude the assembly id from the assembly final name.
257      */
258     @Parameter( property = "assembly.appendAssemblyId", defaultValue = "true" )
259     protected boolean appendAssemblyId;
260 
261     /**
262      * Set to true in order to not fail when a descriptor is missing.
263      */
264     @Parameter( property = "assembly.ignoreMissingDescriptor", defaultValue = "false" )
265     protected boolean ignoreMissingDescriptor;
266 
267     /**
268      * This is a set of instructions to the archive builder, especially for building .jar files. It enables you to
269      * specify a Manifest file for the jar, in addition to other options.
270      * See <a href="http://maven.apache.org/shared/maven-archiver/index.html">Maven Archiver Reference</a>.
271      */
272     @Parameter
273     private MavenArchiveConfiguration archive;
274 
275     /**
276      * The list of extra filter properties files to be used along with System properties, project
277      * properties, and filter properties files specified in the POM build/filters section, which
278      * should be used for the filtering during the current mojo execution.
279      * <br/>
280      * Normally, these will be configured from a plugin's execution section, to provide a different
281      * set of filters for a particular execution.
282      */
283     @Parameter
284     protected List<String> filters;
285 
286     /**
287      * Controls whether the assembly plugin tries to attach the resulting assembly to the project.
288      *
289      * @since 2.2-beta-1
290      */
291     @Parameter( property = "assembly.attach", defaultValue = "true" )
292     private boolean attach;
293 
294     /**
295      * Indicates if zip archives (jar,zip etc) being added to the assembly should be compressed again.
296      * Compressing again can result in smaller archive size, but gives noticeably longer execution time.
297      *
298      * @since 2.4
299      */
300     @Parameter( defaultValue = "true" )
301     private boolean recompressZippedFiles;
302 
303     /**
304      */
305     @Component
306     private AssemblyArchiver assemblyArchiver;
307 
308     /**
309      */
310     @Component
311     private AssemblyReader assemblyReader;
312 
313     /**
314      * Allows additional configuration options that are specific to a particular type of archive format. This is
315      * intended to capture an XML configuration that will be used to reflectively setup the options on the archiver
316      * instance. <br/>
317      * For instance, to direct an assembly with the "ear" format to use a particular deployment descriptor, you should
318      * specify the following for the archiverConfig value in your plugin configuration: <br/>
319      * <p/>
320      * <pre>
321      * &lt;appxml&gt;${project.basedir}/somepath/app.xml&lt;/appxml&gt;
322      * </pre>
323      *
324      * @since 2.2-beta-3
325      */
326     @Parameter
327     private PlexusConfiguration archiverConfig;
328 
329     /**
330      * This will cause the assembly to run only at the top of a given module tree. That is, run in the project contained
331      * in the same folder where the mvn execution was launched.
332      *
333      * @since 2.2-beta-4
334      */
335     @Parameter( property = "assembly.runOnlyAtExecutionRoot", defaultValue = "false" )
336     private boolean runOnlyAtExecutionRoot;
337 
338     /**
339      * This will cause the assembly to only update an existing archive, if it exists.
340      * <p>
341      * <strong>Note:</strong> The property that can be used on the command line
342      * was misspelled as "assembly.updatOnly" in versions prior to version 2.4.
343      * </p>
344      *
345      * @since 2.2
346      */
347     @Parameter( property = "assembly.updateOnly", defaultValue = "false" )
348     private boolean updateOnly;
349 
350     /**
351      * <p>
352      * will use the jvm chmod, this is available for user and all level group level will be ignored
353      * </p>
354      *
355      * @since 2.2
356      */
357     @Parameter( property = "assembly.useJvmChmod", defaultValue = "false" )
358     private boolean useJvmChmod;
359 
360     /**
361      * <p>
362      * Set to <code>true</code> in order to avoid all chmod calls.
363      * </p>
364      * <p/>
365      * <p>
366      * <b>NOTE:</b> This will cause the assembly plugin to <b>DISREGARD</b> all fileMode/directoryMode settings in the
367      * assembly descriptor, and all file permissions in unpacked dependencies!
368      * </p>
369      *
370      * @since 2.2
371      */
372     @Parameter( property = "assembly.ignorePermissions", defaultValue = "false" )
373     private boolean ignorePermissions;
374 
375     /**
376      * Create the binary distribution.
377      * 
378      * @throws org.apache.maven.plugin.MojoExecutionException
379      * 
380      */
381     public void execute()
382         throws MojoExecutionException, MojoFailureException
383     {
384         if ( skipAssembly )
385         {
386             getLog().info( "Assemblies have been skipped per configuration of the skipAssembly parameter." );
387             return;
388         }
389 
390         // run only at the execution root.
391         if ( runOnlyAtExecutionRoot && !isThisTheExecutionRoot() )
392         {
393             getLog().info( "Skipping the assembly in this project because it's not the Execution Root" );
394             return;
395         }
396 
397         List<Assembly> assemblies;
398         try
399         {
400             assemblies = assemblyReader.readAssemblies( this );
401         }
402         catch ( final AssemblyReadException e )
403         {
404             throw new MojoExecutionException( "Error reading assemblies: " + e.getMessage(), e );
405         }
406         catch ( final InvalidAssemblerConfigurationException e )
407         {
408             throw new MojoFailureException( assemblyReader, e.getMessage(), "Mojo configuration is invalid: "
409                             + e.getMessage() );
410         }
411 
412         // TODO: include dependencies marked for distribution under certain formats
413         // TODO: how, might we plug this into an installer, such as NSIS?
414 
415         boolean warnedAboutMainProjectArtifact = false;
416         for (final Assembly assembly : assemblies) {
417             try {
418                 final String fullName = AssemblyFormatUtils.getDistributionName(assembly, this);
419 
420                 List<String> effectiveFormats = formats;
421                 if (effectiveFormats == null || effectiveFormats.size() == 0) {
422                     effectiveFormats = assembly.getFormats();
423                 }
424                 if (effectiveFormats == null || effectiveFormats.size() == 0) {
425                     throw new MojoFailureException("No formats specified in the execution parameters or the assembly descriptor.");
426                 }
427 
428                 for (final String format : effectiveFormats) {
429                     final File destFile =
430                             assemblyArchiver.createArchive(assembly, fullName, format, this, isRecompressZippedFiles());
431 
432                     final MavenProject project = getProject();
433                     final String classifier = getClassifier();
434                     final String type = project.getArtifact()
435                             .getType();
436 
437                     if (attach && destFile.isFile()) {
438                         if (isAssemblyIdAppended()) {
439                             projectHelper.attachArtifact(project, format, assembly.getId(), destFile);
440                         } else if (classifier != null) {
441                             projectHelper.attachArtifact(project, format, classifier, destFile);
442                         } else if (!"pom".equals(type) && format.equals(type)) {
443                             if (!warnedAboutMainProjectArtifact) {
444                                 final StringBuilder message = new StringBuilder();
445 
446                                 message.append("Configuration options: 'appendAssemblyId' is set to false, and 'classifier' is missing.");
447                                 message.append("\nInstead of attaching the assembly file: ")
448                                         .append(destFile)
449                                         .append(", it will become the file for main project artifact.");
450                                 message.append("\nNOTE: If multiple descriptors or descriptor-formats are provided for this project, the value of this file will be non-deterministic!");
451 
452                                 getLog().warn(message);
453                                 warnedAboutMainProjectArtifact = true;
454                             }
455 
456                             final File existingFile = project.getArtifact()
457                                     .getFile();
458                             if ((existingFile != null) && existingFile.exists()) {
459                                 getLog().warn("Replacing pre-existing project main-artifact file: " + existingFile
460                                         + "\nwith assembly file: " + destFile);
461                             }
462 
463                             project.getArtifact()
464                                     .setFile(destFile);
465                         } else {
466                             projectHelper.attachArtifact(project, format, null, destFile);
467                         }
468                     } else if (attach) {
469                         getLog().warn("Assembly file: "
470                                 + destFile
471                                 + " is not a regular file (it may be a directory). It cannot be attached to the project build for installation or deployment.");
472                     }
473                 }
474             } catch (final ArchiveCreationException e) {
475                 throw new MojoExecutionException("Failed to create assembly: " + e.getMessage(), e);
476             } catch (final AssemblyFormattingException e) {
477                 throw new MojoExecutionException("Failed to create assembly: " + e.getMessage(), e);
478             } catch (final InvalidAssemblerConfigurationException e) {
479                 throw new MojoFailureException(assembly, "Assembly is incorrectly configured: " + assembly.getId(),
480                         "Assembly: " + assembly.getId() + " is not configured correctly: "
481                                 + e.getMessage());
482             }
483         }
484     }
485 
486     /**
487      * Returns true if the current project is located at the Execution Root Directory (where mvn was launched)
488      * 
489      * @return
490      */
491     protected boolean isThisTheExecutionRoot()
492     {
493         final Log log = getLog();
494         log.debug( "Root Folder:" + mavenSession.getExecutionRootDirectory() );
495         log.debug( "Current Folder:" + basedir );
496         final boolean result = mavenSession.getExecutionRootDirectory()
497                                            .equalsIgnoreCase( basedir.toString() );
498         if ( result )
499         {
500             log.debug( "This is the execution root." );
501         }
502         else
503         {
504             log.debug( "This is NOT the execution root." );
505         }
506 
507         return result;
508     }
509 
510     protected AssemblyArchiver getAssemblyArchiver()
511     {
512         return assemblyArchiver;
513     }
514 
515     protected AssemblyReader getAssemblyReader()
516     {
517         return assemblyReader;
518     }
519 
520     public File getBasedir()
521     {
522         return basedir;
523     }
524 
525     /**
526      * {@inheritDoc}
527      * 
528      * @deprecated This has been replaced by {@link #getDescriptors()}
529      */
530     @Deprecated
531     public String getDescriptor()
532     {
533         return descriptor;
534     }
535 
536     /**
537      * {@inheritDoc}
538      * 
539      * @deprecated This has been replaced by {@link #getDescriptorReferences()}
540      */
541     @Deprecated
542     public String getDescriptorId()
543     {
544         return descriptorId;
545     }
546 
547     public String[] getDescriptorReferences()
548     {
549         return descriptorRefs;
550     }
551 
552     public File getDescriptorSourceDirectory()
553     {
554         return descriptorSourceDirectory;
555     }
556 
557     public String[] getDescriptors()
558     {
559         return descriptors;
560     }
561 
562     public abstract MavenProject getProject();
563 
564     public File getSiteDirectory()
565     {
566         return siteDirectory;
567     }
568 
569     public boolean isSiteIncluded()
570     {
571         return includeSite;
572     }
573 
574     public String getFinalName()
575     {
576         return finalName;
577     }
578 
579     public boolean isAssemblyIdAppended()
580     {
581         return appendAssemblyId;
582     }
583 
584     public String getTarLongFileMode()
585     {
586         return tarLongFileMode;
587     }
588 
589     public File getOutputDirectory()
590     {
591         return outputDirectory;
592     }
593 
594     public MavenArchiveConfiguration getJarArchiveConfiguration()
595     {
596         return archive;
597     }
598 
599     public File getWorkingDirectory()
600     {
601         return workDirectory;
602     }
603 
604     public ArtifactRepository getLocalRepository()
605     {
606         return localRepository;
607     }
608 
609     public File getTemporaryRootDirectory()
610     {
611         return tempRoot;
612     }
613 
614     public File getArchiveBaseDirectory()
615     {
616         return archiveBaseDirectory;
617     }
618 
619     public List<String> getFilters()
620     {
621         if ( filters == null )
622         {
623             filters = getProject().getBuild()
624                                   .getFilters();
625             if ( filters == null )
626             {
627                 filters = Collections.emptyList();
628             }
629         }
630         return filters;
631     }
632 
633     public List<MavenProject> getReactorProjects()
634     {
635         return reactorProjects;
636     }
637 
638     public String getClassifier()
639     {
640         // TODO Auto-generated method stub
641         return null;
642     }
643 
644     protected MavenProjectHelper getProjectHelper()
645     {
646         return projectHelper;
647     }
648 
649     public void setAppendAssemblyId( final boolean appendAssemblyId )
650     {
651         this.appendAssemblyId = appendAssemblyId;
652     }
653 
654     public void setArchive( final MavenArchiveConfiguration archive )
655     {
656         this.archive = archive;
657     }
658 
659     public void setArchiveBaseDirectory( final File archiveBaseDirectory )
660     {
661         this.archiveBaseDirectory = archiveBaseDirectory;
662     }
663 
664     public void setAssemblyArchiver( final AssemblyArchiver assemblyArchiver )
665     {
666         this.assemblyArchiver = assemblyArchiver;
667     }
668 
669     public void setAssemblyReader( final AssemblyReader assemblyReader )
670     {
671         this.assemblyReader = assemblyReader;
672     }
673 
674     public void setBasedir( final File basedir )
675     {
676         this.basedir = basedir;
677     }
678 
679     public void setClassifier( final String classifier )
680     {
681         this.classifier = classifier;
682     }
683 
684     /**
685      * {@inheritDoc}
686      * 
687      * @deprecated This has been replaced by {@link #setDescriptors(String[])}
688      */
689     @Deprecated
690     public void setDescriptor( final String descriptor )
691     {
692         this.descriptor = descriptor;
693     }
694 
695     /**
696      * {@inheritDoc}
697      * 
698      * @deprecated This has been replaced by {@link #setDescriptorRefs(String[])}
699      */
700     @Deprecated
701     public void setDescriptorId( final String descriptorId )
702     {
703         this.descriptorId = descriptorId;
704     }
705 
706     public void setDescriptorRefs( final String[] descriptorRefs )
707     {
708         this.descriptorRefs = descriptorRefs;
709     }
710 
711     public void setDescriptors( final String[] descriptors )
712     {
713         this.descriptors = descriptors;
714     }
715 
716     public void setDescriptorSourceDirectory( final File descriptorSourceDirectory )
717     {
718         this.descriptorSourceDirectory = descriptorSourceDirectory;
719     }
720 
721     public void setFilters( final List<String> filters )
722     {
723         this.filters = filters;
724     }
725 
726     public void setFinalName( final String finalName )
727     {
728         this.finalName = finalName;
729     }
730 
731     public void setIncludeSite( final boolean includeSite )
732     {
733         this.includeSite = includeSite;
734     }
735 
736     public void setLocalRepository( final ArtifactRepository localRepository )
737     {
738         this.localRepository = localRepository;
739     }
740 
741     public void setOutputDirectory( final File outputDirectory )
742     {
743         this.outputDirectory = outputDirectory;
744     }
745 
746     public void setProjectHelper( final MavenProjectHelper projectHelper )
747     {
748         this.projectHelper = projectHelper;
749     }
750 
751     public void setReactorProjects( final List<MavenProject> reactorProjects )
752     {
753         this.reactorProjects = reactorProjects;
754     }
755 
756     public void setSiteDirectory( final File siteDirectory )
757     {
758         this.siteDirectory = siteDirectory;
759     }
760 
761     public void setTarLongFileMode( final String tarLongFileMode )
762     {
763         this.tarLongFileMode = tarLongFileMode;
764     }
765 
766     public void setTempRoot( final File tempRoot )
767     {
768         this.tempRoot = tempRoot;
769     }
770 
771     public void setWorkDirectory( final File workDirectory )
772     {
773         this.workDirectory = workDirectory;
774     }
775 
776     public List<ArtifactRepository> getRemoteRepositories()
777     {
778         return remoteRepositories;
779     }
780 
781     public boolean isDryRun()
782     {
783         return dryRun;
784     }
785 
786     public boolean isIgnoreDirFormatExtensions()
787     {
788         return ignoreDirFormatExtensions;
789     }
790 
791     public boolean isIgnoreMissingDescriptor()
792     {
793         return ignoreMissingDescriptor;
794     }
795 
796     public void setIgnoreMissingDescriptor( final boolean ignoreMissingDescriptor )
797     {
798         this.ignoreMissingDescriptor = ignoreMissingDescriptor;
799     }
800 
801     public MavenSession getMavenSession()
802     {
803         return mavenSession;
804     }
805 
806     public String getArchiverConfig()
807     {
808         return archiverConfig == null ? null : archiverConfig.toString();
809     }
810 
811     public MavenFileFilter getMavenFileFilter()
812     {
813         return mavenFileFilter;
814     }
815 
816     public boolean isUpdateOnly()
817     {
818         return updateOnly;
819     }
820 
821     public boolean isUseJvmChmod()
822     {
823         return useJvmChmod;
824     }
825 
826     public boolean isIgnorePermissions()
827     {
828         return ignorePermissions;
829     }
830     
831     public String getEncoding()
832     {
833         return encoding;
834     }
835 
836     protected boolean isRecompressZippedFiles()
837     {
838         return recompressZippedFiles;
839     }
840 
841     public String getEscapeString()
842     {
843         return escapeString;
844     }
845 }