-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Maven]Add a Force Compile Property #4618
base: dev
Are you sure you want to change the base?
Conversation
I think you just need mvn clean. I am about to make a few tweaks to the
plugin though. So I’ll take a look. But I doubt we can accept this.
mvn clean compile
…On Thu, May 16, 2024 at 20:34 George Cao ***@***.***> wrote:
When I upgrade antlr to a new version, but keep the grammar files
untouched, the grammar files will not be compiled but there is a warning
message complaining the runtime version changed.
So I add a property forceCompile to skip the checksum and last
modification date check and just re-compile the grammars.
------------------------------
You can view, comment on, or merge this pull request online at:
#4618
Commit Summary
- 6ea7057
<6ea7057>
Skip grammar file change detect and just compile them
- b3a4591
<b3a4591>
Merge remote-tracking branch 'ups/dev' into force-compile
File Changes
(1 file <https://github.com/antlr/antlr4/pull/4618/files>)
- *M*
antlr4-maven-plugin/src/main/java/org/antlr/mojo/antlr4/Antlr4Mojo.java
<https://github.com/antlr/antlr4/pull/4618/files#diff-087307cf9a6c5140fbb29b23c30c3778a6b1871ee15c8ed9e7c5583e1bb4edf8>
(8)
Patch Links:
- https://github.com/antlr/antlr4/pull/4618.patch
- https://github.com/antlr/antlr4/pull/4618.diff
—
Reply to this email directly, view it on GitHub
<#4618>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJ7TMBUZIHTH6BAH4N5PF3ZCVUEBAVCNFSM6AAAAABH3JWQSWVHI2DSMVQWIX3LMV43ASLTON2WKOZSGMYDCNRZGI4TAMQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
I add the plugin as follow:
and I tested |
Your configuration is wrong I think. ...
<executions>
<execution>
<goals>
<goal>antlr4</goal>
</goals>
</execution>
</executions>
<configuration>
<visitor>true</visitor>
<sourceDirectory>src/main/antlr4</sourceDirectory>
</configuration> If your configuration is correct then check permissions and file times. There is no need for this flag. |
I'm using a usual configuration https://github.com/khmarbaise/rpn-calculator/blob/master/pom.xml and it work without any issue... no supplemental source directory configuration needed... just follow the convention... https://github.com/khmarbaise/rpn-calculator/blob/master/rpn/pom.xml |
When I upgrade antlr to a new version, but keep the grammar files untouched, the grammar files will not be compiled but there is a warning message complaining the runtime version changed.
So I add a property forceCompile to skip the checksum and last modification date check and just re-compile the grammars.