View Javadoc

1   //========================================================================
2   //$Id: ScanTargetPattern.java 1888 2007-05-31 08:57:33Z janb $
3   //Copyright 2006 Mort Bay Consulting Pty. Ltd.
4   //------------------------------------------------------------------------
5   //Licensed under the Apache License, Version 2.0 (the "License");
6   //you may not use this file except in compliance with the License.
7   //You may obtain a copy of the License at 
8   //http://www.apache.org/licenses/LICENSE-2.0
9   //Unless required by applicable law or agreed to in writing, software
10  //distributed under the License is distributed on an "AS IS" BASIS,
11  //WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  //See the License for the specific language governing permissions and
13  //limitations under the License.
14  //========================================================================
15  
16  package org.mortbay.jetty.plugin.util;
17  
18  import java.io.File;
19  import java.util.Collections;
20  import java.util.List;
21  
22  /**
23   * ScanTargetPattern
24   *
25   * Utility class to provide the ability for the mvn jetty:run 
26   * mojo to be able to specify filesets of extra files to 
27   * regularly scan for changes in order to redeploy the webapp.
28   * 
29   * For example:
30   * 
31   * <scanTargetPattern>
32   *   <directory>/some/place</directory>
33   *   <includes>
34   *     <include>some ant pattern here </include>
35   *     <include>some ant pattern here </include> 
36   *   </includes>
37   *   <excludes>
38   *     <exclude>some ant pattern here </exclude>
39   *     <exclude>some ant pattern here </exclude>
40   *   </excludes>
41   * </scanTargetPattern>
42   */
43  public class ScanTargetPattern
44  {
45      private File _directory;
46      private List _includes = Collections.EMPTY_LIST;
47      private List _excludes = Collections.EMPTY_LIST;
48  
49      /**
50       * @return the _directory
51       */
52      public File getDirectory()
53      {
54          return _directory;
55      }
56  
57      /**
58       * @param _directory the _directory to set
59       */
60      public void setDirectory(File directory)
61      {
62          this._directory = directory;
63      }
64      
65      public void setIncludes (List includes)
66      {
67          _includes= includes;
68      }
69      
70      public void setExcludes(List excludes)
71      {
72          _excludes = excludes;
73      }
74      
75      public List getIncludes()
76      {
77          return _includes;
78      }
79      
80      public List getExcludes()
81      {
82          return _excludes;
83      }
84  
85  }