@@ -154,6 +154,22 @@ public abstract class AbstractGroovyDocMojo extends AbstractGroovySourcesMojo {
154154 @ Parameter (defaultValue = "PROJECT_ONLY" )
155155 protected IncludeClasspath includeClasspath ;
156156
157+ /**
158+ * Whether to process Groovy Scripts.
159+ *
160+ * @since 1.8.2
161+ */
162+ @ Parameter (defaultValue = "true" )
163+ protected boolean processScripts ;
164+
165+ /**
166+ * Whether to include the implicit <code>public static void main</code> method for scripts.
167+ *
168+ * @since 1.8.2
169+ */
170+ @ Parameter (defaultValue = "true" )
171+ protected boolean includeMainForScripts ;
172+
157173 /**
158174 * Generates the GroovyDoc for the specified sources.
159175 *
@@ -236,22 +252,24 @@ protected synchronized void doGroovyDocGeneration(final FileSet[] sourceDirector
236252 */
237253 protected Properties setupProperties () {
238254 Properties properties = new Properties ();
239- properties .setProperty ("windowTitle" , windowTitle );
240- properties .setProperty ("docTitle" , docTitle );
241- properties .setProperty ("footer" , footer );
242- properties .setProperty ("header" , header );
243- properties .setProperty ("author" , Boolean .toString (displayAuthor ));
244- properties .setProperty ("overviewFile" , overviewFile != null ? overviewFile .getAbsolutePath () : "" );
255+ properties .put ("windowTitle" , windowTitle );
256+ properties .put ("docTitle" , docTitle );
257+ properties .put ("footer" , footer );
258+ properties .put ("header" , header );
259+ properties .put ("author" , Boolean .toString (displayAuthor ));
260+ properties .put ("overviewFile" , overviewFile != null ? overviewFile .getAbsolutePath () : "" );
261+ properties .put ("processScripts" , Boolean .toString (processScripts ));
262+ properties .put ("includeMainForScripts" , Boolean .toString (includeMainForScripts ));
245263 try {
246264 Scopes scopeVal = Scopes .valueOf (scope .toUpperCase ());
247265 if (scopeVal .equals (Scopes .PUBLIC )) {
248- properties .setProperty ("publicScope" , "true" );
266+ properties .put ("publicScope" , "true" );
249267 } else if (scopeVal .equals (Scopes .PROTECTED )) {
250- properties .setProperty ("protectedScope" , "true" );
268+ properties .put ("protectedScope" , "true" );
251269 } else if (scopeVal .equals (Scopes .PACKAGE )) {
252- properties .setProperty ("packageScope" , "true" );
270+ properties .put ("packageScope" , "true" );
253271 } else if (scopeVal .equals (Scopes .PRIVATE )) {
254- properties .setProperty ("privateScope" , "true" );
272+ properties .put ("privateScope" , "true" );
255273 }
256274 } catch (IllegalArgumentException e ) {
257275 getLog ().warn ("Scope (" + scope + ") was not recognized. Skipping argument." );
0 commit comments