1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.codehaus.gmavenplus.mojo;
18
19 import org.apache.maven.plugins.annotations.Mojo;
20 import org.apache.maven.plugins.annotations.Parameter;
21
22 import java.io.File;
23
24
25
26
27
28
29
30
31 @Mojo(name = "addTestStubSources", threadSafe = true)
32 public class AddTestStubSourcesMojo extends AbstractGroovyStubSourcesMojo {
33
34
35
36
37 @Parameter(defaultValue = "${project.build.directory}/generated-sources/groovy-stubs/test")
38 protected File testStubsOutputDirectory;
39
40
41
42
43 @Parameter(property = "maven.test.skip", defaultValue = "false")
44 protected boolean skipTests;
45
46
47
48
49 @Override
50 public void execute() {
51 if (!skipTests) {
52 getLog().debug("Added test stub directory " + testStubsOutputDirectory.getAbsolutePath() + " to project test sources.");
53 project.addTestCompileSourceRoot(testStubsOutputDirectory.getAbsolutePath());
54 }
55 }
56
57 }