@@ -155,11 +155,6 @@ public class DevMojo extends AbstractMojo {
155
155
private static final String ORG_JETBRAINS_KOTLIN = "org.jetbrains.kotlin" ;
156
156
private static final String KOTLIN_MAVEN_PLUGIN = "kotlin-maven-plugin" ;
157
157
158
- private static final String IO_SMALLRYE = "io.smallrye" ;
159
- private static final String ORG_JBOSS_JANDEX = "org.jboss.jandex" ;
160
- private static final String JANDEX_MAVEN_PLUGIN = "jandex-maven-plugin" ;
161
- private static final String JANDEX = "jandex" ;
162
-
163
158
private static final String BOOTSTRAP_ID = "DevMojo" ;
164
159
165
160
/**
@@ -367,6 +362,17 @@ public class DevMojo extends AbstractMojo {
367
362
@ Component
368
363
BuildAnalyticsProvider analyticsProvider ;
369
364
365
+ /**
366
+ * A comma-separated list of Maven plugin keys in {@code groupId:artifactId} format
367
+ * (for example {@code org.codehaus.mojo:flatten-maven-plugin} and/or goal prefixes,
368
+ * (for example {@code flatten}) that should be skipped when {@code quarkus:dev} identifies
369
+ * Maven plugin goals that should be executed before the application is launched in dev mode.
370
+ * <p>
371
+ * Only the {@code flatten} Maven plugin is skipped by default.
372
+ */
373
+ @ Parameter (defaultValue = "org.codehaus.mojo:flatten-maven-plugin" )
374
+ Set <String > skipPlugins ;
375
+
370
376
/**
371
377
* console attributes, used to restore the console state
372
378
*/
@@ -587,6 +593,12 @@ private String handleAutoCompile() throws MojoExecutionException {
587
593
if (p .getExecutions ().isEmpty ()) {
588
594
continue ;
589
595
}
596
+ if (skipPlugins .contains (p .getKey ())) {
597
+ if (getLog ().isDebugEnabled ()) {
598
+ getLog ().debug ("Skipping " + p .getId () + " execution according to skipPlugins value" );
599
+ }
600
+ continue ;
601
+ }
590
602
for (PluginExecution e : p .getExecutions ()) {
591
603
if (e .getPhase () != null && !PRE_DEV_MODE_PHASES .contains (e .getPhase ())) {
592
604
// skip executions with phases post quarkus:dev, such as install, deploy, site, etc
@@ -598,6 +610,13 @@ private String handleAutoCompile() throws MojoExecutionException {
598
610
String goalPrefix = null ;
599
611
if (!e .getGoals ().isEmpty ()) {
600
612
goalPrefix = getMojoDescriptor (p , e .getGoals ().get (0 )).getPluginDescriptor ().getGoalPrefix ();
613
+ if (skipPlugins .contains (goalPrefix )) {
614
+ if (getLog ().isDebugEnabled ()) {
615
+ getLog ().debug ("Skipping " + goalPrefix + " execution according to skipPlugins value" );
616
+ continue ;
617
+ }
618
+ continue ;
619
+ }
601
620
pluginPrefixes .put (goalPrefix , p );
602
621
pluginPrefixes .put (p .getId (), p );
603
622
}
0 commit comments