Skip to content

Commit

Permalink
Generate Flux parser and lexer as part of the build cycle
Browse files Browse the repository at this point in the history
This commit updates the maven configuration to generate the code files for
the parser and lexer for Flux during the build process. The pre-generated
code files for the Flux parser and lexer are removed from the repository.

This change can cause peculiar errors if you do a `mvn clean` followed by
a `mvn install` while the project is opened in eclipse (or possibly any
other IDE that automatically compiles sources in the background). The
reason for this is that eclipe starts compiling the source files again as
soon as `mvn clean` completes. However, at this point the files generated
by antlr are not yet re-generated (and eclipse does not generate them) so
any files relying on these generated files will fail to compile.

The best approach to avoid problems during `mvn clean` is to close the
project in eclipse, run `mvn clean test` on the command line and only open
the project again once this has finished. Subsequently, eclipse background
complilation should work well.

This commit also updates the antlr version to 3.5.1.
  • Loading branch information
cboehme committed Mar 1, 2014
1 parent 27c2390 commit a7b4d78
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 3,977 deletions.
18 changes: 17 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<targetJdk>1.6</targetJdk>
<antlr.version>3.5.1</antlr.version>
</properties>

<scm>
Expand Down Expand Up @@ -142,11 +143,26 @@
<configuration>
<sources>
<source>src/main/antlr3</source>
<source>target/generated-sources/antlr3</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.antlr</groupId>
<artifactId>antlr3-maven-plugin</artifactId>
<version>${antlr.version}</version>
<executions>
<execution>
<id>generate-parser</id>
<goals>
<goal>antlr</goal>
</goals>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down Expand Up @@ -196,7 +212,7 @@
<dependency>
<groupId>org.antlr</groupId>
<artifactId>antlr-runtime</artifactId>
<version>3.4</version>
<version>${antlr.version}</version>
</dependency>

<dependency>
Expand Down
Loading

0 comments on commit a7b4d78

Please sign in to comment.