1 package org.codehaus.mojo.wagon;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 import java.io.IOException;
23
24 import org.apache.maven.plugins.annotations.Component;
25 import org.apache.maven.plugins.annotations.Mojo;
26 import org.apache.maven.plugins.annotations.Parameter;
27 import org.apache.maven.wagon.Wagon;
28 import org.apache.maven.wagon.WagonException;
29 import org.codehaus.mojo.wagon.shared.WagonCopy;
30 import org.codehaus.mojo.wagon.shared.WagonFileSet;
31
32
33
34
35 @Mojo( name = "copy" , requiresProject = false)
36 public class CopyMojo
37 extends AbstractCopyMojo
38 {
39
40
41
42 @Parameter( property = "wagon.fromDir")
43 private String fromDir = "";
44
45
46
47
48 @Parameter( property = "wagon.includes", defaultValue = "*")
49 private String includes;
50
51
52
53
54 @Parameter( property = "wagon.excludes")
55 private String excludes;
56
57
58
59
60 @Parameter( property = "wagon.caseSensitive")
61 private boolean caseSensitive = true;
62
63
64
65
66 @Parameter( property = "wagon.toDir")
67 private String toDir = "";
68
69 @Component
70 private WagonCopy wagonCopy;
71
72 @Override
73 protected void copy( Wagon srcWagon, Wagon targetWagon )
74 throws IOException, WagonException
75 {
76 WagonFileSet fileSet = this.getWagonFileSet( fromDir, includes, excludes, caseSensitive, toDir );
77
78 wagonCopy.copy( srcWagon, fileSet, targetWagon, optimize, this.getLog() );
79 }
80
81 }