diff --git a/src/main/java/org/codehaus/gmavenplus/mojo/AbstractGroovyDocMojo.java b/src/main/java/org/codehaus/gmavenplus/mojo/AbstractGroovyDocMojo.java index 049fae374..f5ff79197 100644 --- a/src/main/java/org/codehaus/gmavenplus/mojo/AbstractGroovyDocMojo.java +++ b/src/main/java/org/codehaus/gmavenplus/mojo/AbstractGroovyDocMojo.java @@ -154,6 +154,18 @@ public abstract class AbstractGroovyDocMojo extends AbstractGroovySourcesMojo { @Parameter(defaultValue = "PROJECT_ONLY") protected IncludeClasspath includeClasspath; + /** + * Whether to process Groovy Scripts. + */ + @Parameter(defaultValue = "true") + protected boolean processScripts; + + /** + * Whether to include the implicit public static void main method for scripts. + */ + @Parameter(defaultValue = "true") + protected boolean includeMainForScripts; + /** * Generates the GroovyDoc for the specified sources. * @@ -236,22 +248,24 @@ protected synchronized void doGroovyDocGeneration(final FileSet[] sourceDirector */ protected Properties setupProperties() { Properties properties = new Properties(); - properties.setProperty("windowTitle", windowTitle); - properties.setProperty("docTitle", docTitle); - properties.setProperty("footer", footer); - properties.setProperty("header", header); - properties.setProperty("author", Boolean.toString(displayAuthor)); - properties.setProperty("overviewFile", overviewFile != null ? overviewFile.getAbsolutePath() : ""); + properties.put("windowTitle", windowTitle); + properties.put("docTitle", docTitle); + properties.put("footer", footer); + properties.put("header", header); + properties.put("author", Boolean.toString(displayAuthor)); + properties.put("overviewFile", overviewFile != null ? overviewFile.getAbsolutePath() : ""); + properties.put("processScripts", Boolean.toString(processScripts)); + properties.put("includeMainForScripts", Boolean.toString(includeMainForScripts)); try { Scopes scopeVal = Scopes.valueOf(scope.toUpperCase()); if (scopeVal.equals(Scopes.PUBLIC)) { - properties.setProperty("publicScope", "true"); + properties.put("publicScope", "true"); } else if (scopeVal.equals(Scopes.PROTECTED)) { - properties.setProperty("protectedScope", "true"); + properties.put("protectedScope", "true"); } else if (scopeVal.equals(Scopes.PACKAGE)) { - properties.setProperty("packageScope", "true"); + properties.put("packageScope", "true"); } else if (scopeVal.equals(Scopes.PRIVATE)) { - properties.setProperty("privateScope", "true"); + properties.put("privateScope", "true"); } } catch (IllegalArgumentException e) { getLog().warn("Scope (" + scope + ") was not recognized. Skipping argument.");