antlr4-maven-plugin ignored when using `quarkus:dev`
See original GitHub issueDescribe the bug
in a Quarkus application, I also applied the org.antlr:antlr4-maven-plugin
.
When I issue mvn clean quarkus:dev
the plugin default behaviour is ignored.
I even tried to specify as:
<plugin>
<groupId>org.antlr</groupId>
<artifactId>antlr4-maven-plugin</artifactId>
<version>${antlr4.version}</version>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>antlr4</goal>
</goals>
to be explicit, but it is still ignored.
To have it working, I need to mvn clean generate-sources quarkus:dev
.
Please notice if I issue the mvn clean install
or mvn clean package
the plugin is accounted for execution as normal.
This application can be used as reproducer: https://github.com/tarilabs/quarkus-aytb/blob/main/pom.xml#L89-L97
Expected behavior
Checkout https://github.com/tarilabs/quarkus-aytb
mvn clean quarkus:dev
I was expected to be working fine.
Actual behavior
mvn clean quarkus:dev
will fail as the Antlr generation from Grammar to Java Source files is ignored.
I need to explicit generate-sources in : mvn clean generate-sources quarkus:dev
to have it actually working.
It’s not clear why, since every maven based app using org.antlr:antlr4-maven-plugin
would have
mvn clean compile
mvn clean install
working in the generate-sources
out of the box.
How to Reproduce?
see “expected behaviour” for steps to reproduce.
Output of uname -a
or ver
20.6.0 Darwin Kernel Version 20.6.0: Mon Aug 30 06:12:21 PDT 2021; root:xnu-7195.141.6~3/RELEASE_X86_64 x86_64
Output of java -version
openjdk version “11.0.7” 2020-04-14 OpenJDK Runtime Environment (build 11.0.7+10) OpenJDK 64-Bit Server VM (build 11.0.7+10, mixed mode)
GraalVM version (if different from Java)
No response
Quarkus version or git rev
Quarkus 2.3.0.Final
Build tool (ie. output of mvnw --version
or gradlew --version
)
Apache Maven 3.8.3 (ff8e977a158738155dc465c6a97ffaf31982d739)
Additional information
I am available if further information is needed. Thanks in advance!
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (6 by maintainers)
@tarilabs you can mitigate that “limitation” by using a Maven profile with
defaultGoals
(in which you can put whatever you need). You’d then only pass that profile tomvn
, no goals whatsoever.Yes, that is correct.