1 package org.codehaus.gmavenplus.mojo;
2
3 import org.apache.maven.plugins.annotations.Mojo;
4 import org.apache.maven.plugins.annotations.Parameter;
5
6 import java.io.File;
7
8
9
10
11
12
13
14
15 @Mojo(name = "addStubSources", threadSafe = true)
16 public class AddStubSourcesMojo extends AbstractGroovyStubSourcesMojo {
17
18
19
20
21 @Parameter(defaultValue = "${project.build.directory}/generated-sources/groovy-stubs/main")
22 protected File stubsOutputDirectory;
23
24
25
26
27 @Override
28 public void execute() {
29 getLog().debug("Added stub directory " + stubsOutputDirectory.getAbsolutePath() + " to project sources.");
30 project.addCompileSourceRoot(stubsOutputDirectory.getAbsolutePath());
31 }
32
33 }