View Javadoc

1   package org.apache.maven.plugin.war;
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.io.IOException;
24  import java.util.ArrayList;
25  import java.util.Arrays;
26  import java.util.Collections;
27  import java.util.Iterator;
28  import java.util.List;
29  
30  import org.apache.maven.archiver.MavenArchiveConfiguration;
31  import org.apache.maven.artifact.factory.ArtifactFactory;
32  import org.apache.maven.execution.MavenSession;
33  import org.apache.maven.model.Resource;
34  import org.apache.maven.plugin.AbstractMojo;
35  import org.apache.maven.plugin.MojoExecutionException;
36  import org.apache.maven.plugin.MojoFailureException;
37  import org.apache.maven.plugin.logging.Log;
38  import org.apache.maven.plugin.war.overlay.OverlayManager;
39  import org.apache.maven.plugin.war.packaging.DependenciesAnalysisPackagingTask;
40  import org.apache.maven.plugin.war.packaging.OverlayPackagingTask;
41  import org.apache.maven.plugin.war.packaging.SaveWebappStructurePostPackagingTask;
42  import org.apache.maven.plugin.war.packaging.WarPackagingContext;
43  import org.apache.maven.plugin.war.packaging.WarPackagingTask;
44  import org.apache.maven.plugin.war.packaging.WarPostPackagingTask;
45  import org.apache.maven.plugin.war.packaging.WarProjectPackagingTask;
46  import org.apache.maven.plugin.war.util.WebappStructure;
47  import org.apache.maven.plugin.war.util.WebappStructureSerializer;
48  import org.apache.maven.project.MavenProject;
49  import org.apache.maven.shared.filtering.MavenFileFilter;
50  import org.apache.maven.shared.filtering.MavenFilteringException;
51  import org.apache.maven.shared.filtering.MavenResourcesExecution;
52  import org.apache.maven.shared.filtering.MavenResourcesFiltering;
53  import org.codehaus.plexus.archiver.jar.JarArchiver;
54  import org.codehaus.plexus.archiver.manager.ArchiverManager;
55  import org.codehaus.plexus.util.StringUtils;
56  
57  /**
58   * Contains common jobs for WAR mojos.
59   *
60   * @version $Id: AbstractWarMojo.java 985625 2010-08-15 08:15:16Z dennisl $
61   */
62  public abstract class AbstractWarMojo
63      extends AbstractMojo
64  {
65      public static final String DEFAULT_FILE_NAME_MAPPING = "@{artifactId}@-@{version}@.@{extension}@";
66  
67      public static final String DEFAULT_FILE_NAME_MAPPING_CLASSIFIER =
68          "@{artifactId}@-@{version}@-@{classifier}@.@{extension}@";
69  
70      private static final String[] EMPTY_STRING_ARRAY = {};
71  
72      private static final String META_INF = "META-INF";
73  
74      private static final String WEB_INF = "WEB-INF";
75  
76      /**
77       * The Maven project.
78       *
79       * @parameter default-value="${project}"
80       * @required
81       * @readonly
82       */
83      private MavenProject project;
84  
85      /**
86       * The directory containing compiled classes.
87       *
88       * @parameter default-value="${project.build.outputDirectory}"
89       * @required
90       * @readonly
91       */
92      private File classesDirectory;
93  
94      /**
95       * Whether a JAR file will be created for the classes in the webapp. Using this optional configuration
96       * parameter will make the compiled classes to be archived into a JAR file
97       * and the classes directory will then be excluded from the webapp.
98       *
99       * @parameter expression="${archiveClasses}" default-value="false"
100      * @since 2.0.1
101      */
102     private boolean archiveClasses;
103 
104     /**
105      * The JAR archiver needed for archiving the classes directory into a JAR file under WEB-INF/lib.
106      *
107      * @component role="org.codehaus.plexus.archiver.Archiver" role-hint="jar"
108      * @required
109      */
110     private JarArchiver jarArchiver;
111 
112     /**
113      * The directory where the webapp is built.
114      *
115      * @parameter default-value="${project.build.directory}/${project.build.finalName}"
116      * @required
117      */
118     private File webappDirectory;
119 
120     /**
121      * Single directory for extra files to include in the WAR. This is where
122      * you place your JSP files.
123      *
124      * @parameter default-value="${basedir}/src/main/webapp"
125      * @required
126      */
127     private File warSourceDirectory;
128 
129     /**
130      * The list of webResources we want to transfer.
131      *
132      * @parameter
133      */
134     private Resource[] webResources;
135 
136     /**
137      * Filters (property files) to include during the interpolation of the pom.xml.
138 
139      * @parameter
140      */
141     private List filters;
142 
143     /**
144      * The path to the web.xml file to use.
145      *
146      * @parameter expression="${maven.war.webxml}"
147      */
148     private File webXml;
149 
150     /**
151      * The path to a configuration file for the servlet container. Note that
152      * the file name may be different for different servlet containers.
153      * Apache Tomcat uses a configuration file named context.xml. The file will
154      * be copied to the META-INF directory.
155      *
156      * @parameter expression="${maven.war.containerConfigXML}"
157      */
158     private File containerConfigXML;
159 
160     /**
161      * Directory to unpack dependent WARs into if needed.
162      *
163      * @parameter default-value="${project.build.directory}/war/work"
164      * @required
165      */
166     private File workDirectory;
167 
168     /**
169      * The file name mapping to use when copying libraries and TLDs. If no file mapping is
170      * set (default) the files are copied with their standard names.
171      *
172      * @parameter
173      * @since 2.1-alpha-1
174      */
175     private String outputFileNameMapping;
176 
177     /**
178      * The file containing the webapp structure cache.
179      *
180      * @parameter default-value="${project.build.directory}/war/work/webapp-cache.xml"
181      * @required
182      * @since 2.1-alpha-1
183      */
184     private File cacheFile;
185 
186     /**
187      * Whether the cache should be used to save the status of the webapp
188      * across multiple runs. Experimental feature so disabled by default.
189      *
190      * @parameter expression="${useCache}" default-value="false"
191      * @since 2.1-alpha-1
192      */
193     private boolean useCache = false;
194 
195     /**
196      * @component role="org.apache.maven.artifact.factory.ArtifactFactory"
197      * @required
198      * @readonly
199      */
200     private ArtifactFactory artifactFactory;
201 
202     /**
203      * To look up Archiver/UnArchiver implementations.
204      *
205      * @component role="org.codehaus.plexus.archiver.manager.ArchiverManager"
206      * @required
207      */
208     private ArchiverManager archiverManager;
209 
210     /**
211      * @component role="org.apache.maven.shared.filtering.MavenFileFilter" role-hint="default"
212      * @required
213      */
214     private MavenFileFilter mavenFileFilter;
215 
216     /**
217      * @component role="org.apache.maven.shared.filtering.MavenResourcesFiltering" role-hint="default"
218      * @required
219      */
220     private MavenResourcesFiltering mavenResourcesFiltering;
221 
222     /**
223      * The comma separated list of tokens to include when copying the content
224      * of the warSourceDirectory.
225      *
226      * @parameter alias="includes" default-value="**"
227      */
228     private String warSourceIncludes;
229 
230     /**
231      * The comma separated list of tokens to exclude when copying the content
232      * of the warSourceDirectory.
233      *
234      * @parameter alias="excludes"
235      */
236     private String warSourceExcludes;
237 
238     /**
239      * The comma separated list of tokens to include when doing
240      * a WAR overlay.
241      * Default is '**'
242      *
243      * @parameter
244      * @deprecated Use <overlay>/<includes> instead
245      */
246     private String dependentWarIncludes = "**/**";
247 
248     /**
249      * The comma separated list of tokens to exclude when doing
250      * a WAR overlay.
251      *
252      * @parameter
253      * @deprecated Use <overlay>/<excludes> instead
254      */
255     private String dependentWarExcludes = "META-INF/**";
256 
257     /**
258      * The overlays to apply.
259      *
260      * @parameter
261      * @since 2.1-alpha-1
262      */
263     private List overlays = new ArrayList();
264 
265     /**
266      * A list of file extensions that should not be filtered.
267      * <b>Will be used when filtering webResources and overlays.</b>
268      *
269      * @parameter
270      * @since 2.1-alpha-2
271      */
272     private List nonFilteredFileExtensions;
273 
274     /**
275      * @parameter default-value="${session}"
276      * @readonly
277      * @required
278      * @since 2.1-alpha-2
279      */
280     private MavenSession session;
281 
282     /**
283      * To filter deployment descriptors. <b>Disabled by default.</b>
284      *
285      * @parameter expression="${maven.war.filteringDeploymentDescriptors}" default-value="false"
286      * @since 2.1-alpha-2
287      */
288     private boolean filteringDeploymentDescriptors = false;
289 
290     /**
291      * To escape interpolated values with Windows path
292      * <code>c:\foo\bar</code> will be replaced with <code>c:\\foo\\bar</code>.
293      *
294      * @parameter expression="${maven.war.escapedBackslashesInFilePath}" default-value="false"
295      * @since 2.1-alpha-2
296      */
297     private boolean escapedBackslashesInFilePath = false;
298 
299     /**
300      * Expression preceded with this String won't be interpolated.
301      * <code>\${foo}</code> will be replaced with <code>${foo}</code>.
302      *
303      * @parameter expression="${maven.war.escapeString}"
304      * @since 2.1-beta-1
305      */
306     protected String escapeString;
307 
308     /**
309      * The archive configuration to use.
310      * See <a href="http://maven.apache.org/shared/maven-archiver/index.html">Maven Archiver Reference</a>.
311      *
312      * @parameter
313      */
314     private MavenArchiveConfiguration archive = new MavenArchiveConfiguration();
315 
316     private final WebappStructureSerializer webappStructureSerialier = new WebappStructureSerializer();
317 
318     private final Overlay currentProjectOverlay = Overlay.createInstance();
319 
320 
321     public Overlay getCurrentProjectOverlay()
322     {
323         return currentProjectOverlay;
324     }
325 
326     /**
327      * Returns a string array of the excludes to be used
328      * when copying the content of the WAR source directory.
329      *
330      * @return an array of tokens to exclude
331      */
332     protected String[] getExcludes()
333     {
334         List excludeList = new ArrayList();
335         if ( StringUtils.isNotEmpty( warSourceExcludes ) )
336         {
337             excludeList.addAll( Arrays.asList( StringUtils.split( warSourceExcludes, "," ) ) );
338         }
339 
340         // if webXML is specified, omit the one in the source directory
341         if ( webXml != null && StringUtils.isNotEmpty( webXml.getName() ) )
342         {
343             excludeList.add( "**/" + WEB_INF + "/web.xml" );
344         }
345 
346         // if contextXML is specified, omit the one in the source directory
347         if ( containerConfigXML != null && StringUtils.isNotEmpty( containerConfigXML.getName() ) )
348         {
349             excludeList.add( "**/" + META_INF + "/" + containerConfigXML.getName() );
350         }
351 
352         return (String[]) excludeList.toArray( EMPTY_STRING_ARRAY );
353     }
354 
355     /**
356      * Returns a string array of the includes to be used
357      * when assembling/copying the WAR.
358      *
359      * @return an array of tokens to include
360      */
361     protected String[] getIncludes()
362     {
363         return StringUtils.split( StringUtils.defaultString( warSourceIncludes ), "," );
364     }
365 
366     /**
367      * Returns a string array of the excludes to be used
368      * when adding dependent WAR as an overlay onto this WAR.
369      *
370      * @return an array of tokens to exclude
371      */
372     protected String[] getDependentWarExcludes()
373     {
374         String[] excludes;
375         if ( StringUtils.isNotEmpty( dependentWarExcludes ) )
376         {
377             excludes = StringUtils.split( dependentWarExcludes, "," );
378         }
379         else
380         {
381             excludes = EMPTY_STRING_ARRAY;
382         }
383         return excludes;
384     }
385 
386     /**
387      * Returns a string array of the includes to be used
388      * when adding dependent WARs as an overlay onto this WAR.
389      *
390      * @return an array of tokens to include
391      */
392     protected String[] getDependentWarIncludes()
393     {
394         return StringUtils.split( StringUtils.defaultString( dependentWarIncludes ), "," );
395     }
396 
397     public void buildExplodedWebapp( File webappDirectory )
398         throws MojoExecutionException, MojoFailureException
399     {
400         webappDirectory.mkdirs();
401 
402         try
403         {
404             buildWebapp( project, webappDirectory );
405         }
406         catch ( IOException e )
407         {
408             throw new MojoExecutionException( "Could not build webapp", e );
409         }
410     }
411 
412 
413     /**
414      * Builds the webapp for the specified project with the new packaging task
415      * thingy
416      * <p/>
417      * Classes, libraries and tld files are copied to
418      * the <tt>webappDirectory</tt> during this phase.
419      *
420      * @param project         the maven project
421      * @param webappDirectory the target directory
422      * @throws MojoExecutionException if an error occurred while packaging the webapp
423      * @throws MojoFailureException   if an unexpected error occurred while packaging the webapp
424      * @throws IOException            if an error occurred while copying the files
425      */
426     public void buildWebapp( MavenProject project, File webappDirectory )
427         throws MojoExecutionException, MojoFailureException, IOException
428     {
429 
430         WebappStructure cache;
431         if ( useCache && cacheFile.exists() )
432         {
433             cache = new WebappStructure( project.getDependencies(), webappStructureSerialier.fromXml( cacheFile ) );
434         }
435         else
436         {
437             cache = new WebappStructure( project.getDependencies(), null );
438         }
439 
440         final long startTime = System.currentTimeMillis();
441         getLog().info( "Assembling webapp [" + project.getArtifactId() + "] in [" + webappDirectory + "]" );
442 
443         final OverlayManager overlayManager =
444             new OverlayManager( overlays, project, dependentWarIncludes, dependentWarExcludes, currentProjectOverlay );
445         final List packagingTasks = getPackagingTasks( overlayManager );
446         List defaultFilterWrappers = null;
447         try
448         {
449             MavenResourcesExecution mavenResourcesExecution = new MavenResourcesExecution();
450             mavenResourcesExecution.setEscapeString( escapeString );
451 
452             defaultFilterWrappers = mavenFileFilter.getDefaultFilterWrappers( project, filters,
453                                                                               escapedBackslashesInFilePath,
454                                                                               this.session, mavenResourcesExecution );
455 
456         }
457         catch ( MavenFilteringException e )
458         {
459             getLog().error( "fail to build filering wrappers " + e.getMessage() );
460             throw new MojoExecutionException( e.getMessage(), e );
461         }
462 
463         final WarPackagingContext context = new DefaultWarPackagingContext( webappDirectory, cache, overlayManager,
464                                                                             defaultFilterWrappers,
465                                                                             getNonFilteredFileExtensions(),
466                                                                             filteringDeploymentDescriptors,
467                                                                             this.artifactFactory );
468         final Iterator it = packagingTasks.iterator();
469         while ( it.hasNext() )
470         {
471             WarPackagingTask warPackagingTask = (WarPackagingTask) it.next();
472             warPackagingTask.performPackaging( context );
473         }
474 
475         // Post packaging
476         final List postPackagingTasks = getPostPackagingTasks();
477         final Iterator it2 = postPackagingTasks.iterator();
478         while ( it2.hasNext() )
479         {
480             WarPostPackagingTask task = (WarPostPackagingTask) it2.next();
481             task.performPostPackaging( context );
482 
483         }
484         getLog().info( "Webapp assembled in [" + ( System.currentTimeMillis() - startTime ) + " msecs]" );
485 
486     }
487 
488     /**
489      * Returns a <tt>List</tt> of the {@link org.apache.maven.plugin.war.packaging.WarPackagingTask}
490      * instances to invoke to perform the packaging.
491      *
492      * @param overlayManager the overlay manager
493      * @return the list of packaging tasks
494      * @throws MojoExecutionException if the packaging tasks could not be built
495      */
496     private List getPackagingTasks( OverlayManager overlayManager )
497         throws MojoExecutionException
498     {
499         final List packagingTasks = new ArrayList();
500         if ( useCache )
501         {
502             packagingTasks.add( new DependenciesAnalysisPackagingTask() );
503         }
504 
505         final List resolvedOverlays = overlayManager.getOverlays();
506         final Iterator it = resolvedOverlays.iterator();
507         while ( it.hasNext() )
508         {
509             Overlay overlay = (Overlay) it.next();
510             if ( overlay.isCurrentProject() )
511             {
512                 packagingTasks.add( new WarProjectPackagingTask( webResources, webXml, containerConfigXML,
513                                                                  currentProjectOverlay ) );
514             }
515             else
516             {
517                 packagingTasks.add( new OverlayPackagingTask( overlay, currentProjectOverlay ) );
518             }
519         }
520         return packagingTasks;
521     }
522 
523 
524     /**
525      * Returns a <tt>List</tt> of the {@link org.apache.maven.plugin.war.packaging.WarPostPackagingTask}
526      * instances to invoke to perform the post-packaging.
527      *
528      * @return the list of post packaging tasks
529      */
530     private List getPostPackagingTasks()
531     {
532         final List postPackagingTasks = new ArrayList();
533         if ( useCache )
534         {
535             postPackagingTasks.add( new SaveWebappStructurePostPackagingTask( cacheFile ) );
536         }
537         // TODO add lib scanning to detect duplicates
538         return postPackagingTasks;
539     }
540 
541     /**
542      * WarPackagingContext default implementation
543      */
544     private class DefaultWarPackagingContext
545         implements WarPackagingContext
546     {
547 
548         private final ArtifactFactory artifactFactory;
549 
550         private final WebappStructure webappStructure;
551 
552         private final File webappDirectory;
553 
554         private final OverlayManager overlayManager;
555 
556         private final List filterWrappers;
557 
558         private List nonFilteredFileExtensions;
559 
560         private boolean filteringDeploymentDescriptors;
561 
562         public DefaultWarPackagingContext( File webappDirectory, final WebappStructure webappStructure,
563                                            final OverlayManager overlayManager, List filterWrappers,
564                                            List nonFilteredFileExtensions, boolean filteringDeploymentDescriptors,
565                                            ArtifactFactory artifactFactory )
566         {
567             this.webappDirectory = webappDirectory;
568             this.webappStructure = webappStructure;
569             this.overlayManager = overlayManager;
570             this.filterWrappers = filterWrappers;
571             this.artifactFactory = artifactFactory;
572             this.filteringDeploymentDescriptors = filteringDeploymentDescriptors;
573             this.nonFilteredFileExtensions = nonFilteredFileExtensions == null ? Collections.EMPTY_LIST
574                                                                               : nonFilteredFileExtensions;
575             // This is kinda stupid but if we loop over the current overlays and we request the path structure
576             // it will register it. This will avoid wrong warning messages in a later phase
577             final Iterator it = overlayManager.getOverlayIds().iterator();
578             while ( it.hasNext() )
579             {
580                 String overlayId = (String) it.next();
581                 webappStructure.getStructure( overlayId );
582             }
583         }
584 
585         public MavenProject getProject()
586         {
587             return project;
588         }
589 
590         public File getWebappDirectory()
591         {
592             return webappDirectory;
593         }
594 
595         public File getClassesDirectory()
596         {
597             return classesDirectory;
598         }
599 
600         public Log getLog()
601         {
602             return AbstractWarMojo.this.getLog();
603         }
604 
605         public String getOutputFileNameMapping()
606         {
607             return outputFileNameMapping;
608         }
609 
610         public File getWebappSourceDirectory()
611         {
612             return warSourceDirectory;
613         }
614 
615         public String[] getWebappSourceIncludes()
616         {
617             return getIncludes();
618         }
619 
620         public String[] getWebappSourceExcludes()
621         {
622             return getExcludes();
623         }
624 
625         public boolean archiveClasses()
626         {
627             return archiveClasses;
628         }
629 
630         public File getOverlaysWorkDirectory()
631         {
632             return workDirectory;
633         }
634 
635         public ArchiverManager getArchiverManager()
636         {
637             return archiverManager;
638         }
639 
640         public MavenArchiveConfiguration getArchive()
641         {
642             return archive;
643         }
644 
645         public JarArchiver getJarArchiver()
646         {
647             return jarArchiver;
648         }
649 
650         public List getFilters()
651         {
652             return filters;
653         }
654 
655         public WebappStructure getWebappStructure()
656         {
657             return webappStructure;
658         }
659 
660         public List getOwnerIds()
661         {
662             return overlayManager.getOverlayIds();
663         }
664 
665         public MavenFileFilter getMavenFileFilter()
666         {
667             return mavenFileFilter;
668         }
669 
670         public List getFilterWrappers()
671         {
672             return filterWrappers;
673         }
674 
675         public boolean isNonFilteredExtension( String fileName )
676         {
677             return !mavenResourcesFiltering.filteredFileExtension( fileName, nonFilteredFileExtensions );
678         }
679 
680         public boolean isFilteringDeploymentDescriptors()
681         {
682             return filteringDeploymentDescriptors;
683         }
684 
685         public ArtifactFactory getArtifactFactory()
686         {
687             return this.artifactFactory;
688         }
689 
690     }
691 
692     public MavenProject getProject()
693     {
694         return project;
695     }
696 
697     public void setProject( MavenProject project )
698     {
699         this.project = project;
700     }
701 
702     public File getClassesDirectory()
703     {
704         return classesDirectory;
705     }
706 
707     public void setClassesDirectory( File classesDirectory )
708     {
709         this.classesDirectory = classesDirectory;
710     }
711 
712     public File getWebappDirectory()
713     {
714         return webappDirectory;
715     }
716 
717     public void setWebappDirectory( File webappDirectory )
718     {
719         this.webappDirectory = webappDirectory;
720     }
721 
722     public File getWarSourceDirectory()
723     {
724         return warSourceDirectory;
725     }
726 
727     public void setWarSourceDirectory( File warSourceDirectory )
728     {
729         this.warSourceDirectory = warSourceDirectory;
730     }
731 
732     public File getWebXml()
733     {
734         return webXml;
735     }
736 
737     public void setWebXml( File webXml )
738     {
739         this.webXml = webXml;
740     }
741 
742     public File getContainerConfigXML()
743     {
744         return containerConfigXML;
745     }
746 
747     public void setContainerConfigXML( File containerConfigXML )
748     {
749         this.containerConfigXML = containerConfigXML;
750     }
751 
752     public String getOutputFileNameMapping()
753     {
754         return outputFileNameMapping;
755     }
756 
757     public void setOutputFileNameMapping( String outputFileNameMapping )
758     {
759         this.outputFileNameMapping = outputFileNameMapping;
760     }
761 
762     public List getOverlays()
763     {
764         return overlays;
765     }
766 
767     public void setOverlays( List overlays )
768     {
769         this.overlays = overlays;
770     }
771 
772     public void addOverlay( Overlay overlay )
773     {
774         overlays.add( overlay );
775     }
776 
777     public boolean isArchiveClasses()
778     {
779         return archiveClasses;
780     }
781 
782     public void setArchiveClasses( boolean archiveClasses )
783     {
784         this.archiveClasses = archiveClasses;
785     }
786 
787     public JarArchiver getJarArchiver()
788     {
789         return jarArchiver;
790     }
791 
792     public void setJarArchiver( JarArchiver jarArchiver )
793     {
794         this.jarArchiver = jarArchiver;
795     }
796 
797     public Resource[] getWebResources()
798     {
799         return webResources;
800     }
801 
802     public void setWebResources( Resource[] webResources )
803     {
804         this.webResources = webResources;
805     }
806 
807     public List getFilters()
808     {
809         return filters;
810     }
811 
812     public void setFilters( List filters )
813     {
814         this.filters = filters;
815     }
816 
817     public File getWorkDirectory()
818     {
819         return workDirectory;
820     }
821 
822     public void setWorkDirectory( File workDirectory )
823     {
824         this.workDirectory = workDirectory;
825     }
826 
827     public File getCacheFile()
828     {
829         return cacheFile;
830     }
831 
832     public void setCacheFile( File cacheFile )
833     {
834         this.cacheFile = cacheFile;
835     }
836 
837     public String getWarSourceIncludes()
838     {
839         return warSourceIncludes;
840     }
841 
842     public void setWarSourceIncludes( String warSourceIncludes )
843     {
844         this.warSourceIncludes = warSourceIncludes;
845     }
846 
847     public String getWarSourceExcludes()
848     {
849         return warSourceExcludes;
850     }
851 
852     public void setWarSourceExcludes( String warSourceExcludes )
853     {
854         this.warSourceExcludes = warSourceExcludes;
855     }
856 
857 
858     public boolean isUseCache()
859     {
860         return useCache;
861     }
862 
863     public void setUseCache( boolean useCache )
864     {
865         this.useCache = useCache;
866     }
867 
868     public MavenArchiveConfiguration getArchive()
869     {
870         return archive;
871     }
872 
873     public List getNonFilteredFileExtensions()
874     {
875         return nonFilteredFileExtensions;
876     }
877 
878     public void setNonFilteredFileExtensions( List nonFilteredFileExtensions )
879     {
880         this.nonFilteredFileExtensions = nonFilteredFileExtensions;
881     }
882 
883     public ArtifactFactory getArtifactFactory()
884     {
885         return this.artifactFactory;
886     }
887 
888     public void setArtifactFactory( ArtifactFactory artifactFactory )
889     {
890         this.artifactFactory = artifactFactory;
891     }
892 }