1 package org.apache.maven.tools.plugin.scanner;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 import org.apache.maven.plugin.descriptor.MojoDescriptor;
23 import org.apache.maven.plugin.descriptor.PluginDescriptor;
24 import org.apache.maven.project.MavenProject;
25 import org.apache.maven.tools.plugin.extractor.MojoDescriptorExtractor;
26
27 import java.util.Collections;
28 import java.util.List;
29
30 /**
31 * @author jdcasey
32 */
33 public class ScannerTestExtractor
34 implements MojoDescriptorExtractor
35 {
36 private final String goal;
37
38 public ScannerTestExtractor( String goal )
39 {
40 this.goal = goal;
41 }
42
43 public List execute( MavenProject project, PluginDescriptor pluginDescriptor )
44 {
45 MojoDescriptor desc = new MojoDescriptor();
46 desc.setPluginDescriptor( pluginDescriptor );
47 desc.setGoal( goal );
48
49 return Collections.singletonList( desc );
50 }
51
52 }