1 package org.apache.maven.plugin.resources;
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 org.apache.maven.model.Resource;
23 import org.apache.maven.plugins.annotations.Mojo;
24 import org.apache.maven.plugins.annotations.Parameter;
25
26 import java.io.File;
27 import java.util.List;
28
29 /**
30 * Copy resources of the configured plugin attribute resources
31 *
32 * @author Olivier Lamy
33 * @since 2.3
34 */
35 @Mojo( name = "copy-resources", threadSafe = true )
36 public class CopyResourcesMojo
37 extends ResourcesMojo
38 {
39
40 /**
41 * The output directory into which to copy the resources.
42 */
43 @Parameter( required = true )
44 private File outputDirectory;
45
46 /**
47 * The list of resources we want to transfer. See the Maven Model for a
48 * description of how to code the resources element.
49 */
50 @Parameter( required = true )
51 private List<Resource> resources;
52
53
54 public File getOutputDirectory()
55 {
56 return outputDirectory;
57 }
58
59 public void setOutputDirectory( File outputDirectory )
60 {
61 this.outputDirectory = outputDirectory;
62 }
63
64 public List<Resource> getResources()
65 {
66 return resources;
67 }
68
69 public void setResources( List<Resource> resources )
70 {
71 this.resources = resources;
72 }
73
74 public List<String> getFilters()
75 {
76 return filters;
77 }
78
79 public void setFilters( List<String> filters )
80 {
81 this.filters = filters;
82 }
83
84 }