Hi,
I created a grammar that allows writing simple tests for a term rewriting
system.
I placed the grammar under src/test/antlr3/<my package>/ .
This directory is not processed by the antlr3 plugin by default, so I added
a new execution to the plugin, specifying the the source directory mentioned
above. The sources are generated to target/generated-sources.
The problem is that this directory is not in the source path of the compiler
plugin at the test-compile phase. I also tried to set the outputDirectory to
target/generated-test-sources, but nothing changed. The source path
contained only src/test/java and I did not find any way to add another
directory to it.
The only solution was to set the output directory to src/test/java what is
not a nice solution.
<plugin>
<groupId>org.antlr</groupId>
<artifactId>antlr3-maven-plugin</artifactId>
<executions>
<execution>
<id>default</id>
<goals>
<goal>antlr</goal>
</goals>
</execution>
<execution>
<id>test</id>
<phase>generate-test-sources</phase>
<goals>
<goal>antlr</goal>
</goals>
<configuration>
<sourceDirectory>src/test/antlr3</sourceDirectory>
<!--outputDirectory>target/generated-sources</outputDirectory-->
<!--outputDirectory>target/generated-test-sources</outputDirectory-->
<outputDirectory>src/test/java</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
Is it possible to add target/generated-test-sources directory to the source
path of the compiler plugin for the test-compile phase?
I think, it would be a comfortable default behaviour if the plugin would
process src/test/antlr3 by default and it would generate sources under
target/generated-test-sources. (If there is a way to add that directory to
the source path of the compiler.)
Thanks,
Miklos
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"il-antlr-interest" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/il-antlr-interest?hl=en
-~----------~----~----~----~------~----~------~--~---
List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe:
http://www.antlr.org/mailman/options/antlr-interest/your-email-address