Skip to content

Commit 27526c9

Browse files
authored
Merge pull request #51112 from Sanne/EnableMavenExtensionsHint
Recommend to Maven users to enable the Maven extensions for the Quarkus plugin
2 parents be6f089 + c2bc17e commit 27526c9

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

devtools/maven/src/main/java/io/quarkus/maven/QuarkusBootstrapMojo.java

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ public abstract class QuarkusBootstrapMojo extends AbstractMojo {
175175

176176
@Override
177177
public void execute() throws MojoExecutionException, MojoFailureException {
178+
hintEnableExtensions();
178179
if (!beforeExecute()) {
179180
return;
180181
}
@@ -199,6 +200,22 @@ public void execute() throws MojoExecutionException, MojoFailureException {
199200
}
200201
}
201202

203+
private void hintEnableExtensions() {
204+
if (!bootstrapSessionListener.isEnabled()) {
205+
super.getLog().warn("The Maven extensions for the Quarkus Maven plugin are not enabled for this build. " +
206+
"We recommend enabling this, so that the plugin can verify essential build settings have been configured as required. "
207+
+
208+
"Please enable by adding \"<extensions>true</extensions>\" in your quarkus-maven-plugin declaration; it should look like:\n"
209+
+
210+
"\n\t<plugin>\n" +
211+
"\t\t<groupId>${quarkus.platform.group-id}</groupId>\n" +
212+
"\t\t<artifactId>quarkus-maven-plugin</artifactId>\n" +
213+
"\t\t<version>${quarkus.platform.version}</version>\n" +
214+
"\t\t<extensions>true</extensions> <!-- THIS ONE -->\n" +
215+
"\t\t...\n");
216+
}
217+
}
218+
202219
@Override
203220
public void setLog(Log log) {
204221
super.setLog(log);

0 commit comments

Comments
 (0)