1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.codehaus.mojo.wagon;
17
18 import java.util.List;
19
20 import org.apache.maven.plugin.MojoExecutionException;
21 import org.apache.maven.wagon.Wagon;
22 import org.apache.maven.wagon.WagonException;
23 import org.codehaus.mojo.wagon.shared.WagonFileSet;
24
25
26
27
28
29
30
31 public class ListMojo extends AbstractWagonListMojo {
32
33
34
35
36
37
38 protected boolean showFiles;
39
40 @Override
41 protected void execute(Wagon wagon) throws MojoExecutionException, WagonException {
42 WagonFileSet wagonFileSet = getWagonFileSet();
43 List<String> files = wagonDownload.getFileList(wagon, wagonFileSet, getLog());
44 if (showFiles) {
45 for (String file : files) {
46 getLog().info(file);
47 }
48 }
49 }
50
51 public boolean isShowFiles() {
52 return showFiles;
53 }
54
55 public void setShowFiles(boolean showFiles) {
56 this.showFiles = showFiles;
57 }
58 }