1 /*
2 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements. See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership. The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the
7 * "License"); you may not use this file except in compliance
8 * with the License. You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing,
13 * software distributed under the License is distributed on an
14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 * KIND, either express or implied. See the License for the
16 * specific language governing permissions and limitations
17 * under the License.
18 */
19 package org.apache.maven.plugins.resources;
20
21 import java.io.File;
22 import java.util.List;
23
24 import org.apache.maven.model.Resource;
25 import org.apache.maven.plugins.annotations.Mojo;
26 import org.apache.maven.plugins.annotations.Parameter;
27
28 /**
29 * Copy resources of the configured plugin attribute resources
30 *
31 * @author Olivier Lamy
32 * @since 2.3
33 */
34 @Mojo(name = "copy-resources", threadSafe = true)
35 public class CopyResourcesMojo extends ResourcesMojo {
36
37 /**
38 * The output directory into which to copy the resources.
39 */
40 @Parameter(required = true)
41 private File outputDirectory;
42
43 /**
44 * The list of resources we want to transfer. See the Maven Model for a
45 * description of how to code the resources element.
46 */
47 @Parameter(required = true)
48 private List<Resource> resources;
49
50 /** {@inheritDoc} */
51 public File getOutputDirectory() {
52 return outputDirectory;
53 }
54
55 /** {@inheritDoc} */
56 public void setOutputDirectory(File outputDirectory) {
57 this.outputDirectory = outputDirectory;
58 }
59
60 /** {@inheritDoc} */
61 public List<Resource> getResources() {
62 return resources;
63 }
64
65 /** {@inheritDoc} */
66 public void setResources(List<Resource> resources) {
67 this.resources = resources;
68 }
69
70 /** {@inheritDoc} */
71 public List<String> getFilters() {
72 return filters;
73 }
74
75 /** {@inheritDoc} */
76 public void setFilters(List<String> filters) {
77 this.filters = filters;
78 }
79 }