3636 * wrapped in one {@code <figletFont>} tag referencing that font.
3737 *
3838 * <h2>Minimal configuration</h2>
39+ * An {@code <execution>} is required to bind the goal into the build — a plugin
40+ * merely listed in {@code <build><plugins>} without one is never invoked
41+ * automatically. No {@code <phase>} is needed inside it, though: the goal
42+ * defaults to the {@code validate} phase (see {@link LifecyclePhase#VALIDATE}).
43+ * To avoid repeating the {@code <execution>} block in every module, declare it
44+ * once in a shared parent POM instead.
3945 * <pre>{@code
4046 * <plugin>
4147 * <groupId>io.github.spannm</groupId>
6369 * }</pre>
6470 *
6571 * <h2>Multi-module builds</h2>
66- * This goal only executes for the execution-root project (the module Maven
67- * was invoked on) and is a no-op for every other module in the reactor, even
68- * if bound in a child module's own {@code pom.xml}. This prevents the same
69- * banner from being printed once per module.
72+ * By default, this goal only executes for the execution-root project (the
73+ * module Maven was invoked on) and is a no-op for every other module in the
74+ * reactor, even if bound in a child module's own {@code pom.xml}. This
75+ * prevents the same banner from being printed once per module when the
76+ * execution is inherited from a shared parent POM.
77+ * <p>
78+ * Some use cases do want a banner per module (e.g. a distinct name per
79+ * artifact). Set {@code executionRootOnly} to {@code false} — typically
80+ * overridden in a specific module's own {@code <configuration>}, not
81+ * globally in the parent — to render there too.
7082 *
7183 * @since 1.0.0
7284 */
@@ -102,7 +114,8 @@ public class RenderMojo extends AbstractFontMojo {
102114 */
103115 @ Parameter (property = "figlet.content" ,
104116 defaultValue = "<lineBreak/><figletFont name=\" standard\" >${project.name}</figletFont><lineBreak/><preserveWhitespace> v${project.version}</preserveWhitespace><lineBreak/>" ,
105- required = true , alias = "content" )
117+ required = true ,
118+ alias = "content" )
106119 private String parmContent ;
107120
108121 /**
@@ -112,16 +125,31 @@ public class RenderMojo extends AbstractFontMojo {
112125 * When {@code false}, unsupported characters are silently replaced by
113126 * {@code '?'}, and unresolved placeholders are left as-is (with a warning logged).
114127 */
115- @ Parameter (property = "figlet.strict" , defaultValue = "true" , alias = "strict" )
128+ @ Parameter (property = "figlet.strict" ,
129+ defaultValue = "true" ,
130+ alias = "strict" )
116131 private boolean parmStrict ;
117132
118133 /**
119134 * Where to output the ASCII art banner.<br>
120135 * Supported values are: {@code info}, {@code debug}, {@code stdout}, {@code stderr}.
121136 */
122- @ Parameter (property = "figlet.target" , defaultValue = "info" , alias = "target" )
137+ @ Parameter (property = "figlet.target" ,
138+ defaultValue = "info" ,
139+ alias = "target" )
123140 private String parmTarget ;
124141
142+ /**
143+ * When {@code true} (the default), this goal only runs for the
144+ * execution-root project and is a no-op in every other reactor module —
145+ * see the class Javadoc for why. Set to {@code false} in a module that
146+ * should render its own banner regardless of reactor position.
147+ */
148+ @ Parameter (property = "figlet.executionRootOnly" ,
149+ defaultValue = "true" ,
150+ alias = "executionRootOnly" )
151+ private boolean parmExecutionRootOnly ;
152+
125153 /** The current Maven project, injected automatically. */
126154 @ Parameter (defaultValue = "${project}" , readonly = true , required = true , alias = "project" )
127155 private MavenProject parmProject ;
@@ -132,8 +160,9 @@ int getWidth() {
132160
133161 @ Override
134162 protected void executeImpl () throws MojoExecutionException , MojoFailureException {
135- if (!parmProject .isExecutionRoot ()) {
136- getLog ().debug ("Skipping figlet rendering: project is not the execution root" );
163+ if (parmExecutionRootOnly && !parmProject .isExecutionRoot ()) {
164+ getLog ().debug ("Skipping figlet rendering: project is not the execution root "
165+ + "(set executionRootOnly=false to render in this module too)" );
137166 return ;
138167 }
139168
0 commit comments