[
http://jira.codehaus.org/browse/MJAVACC-53?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_121112
]
Paul Gier commented on MJAVACC-53:
----------------------------------
I added the new integration test, and removed the code that adds jjtree's
output directory to the list of project compile directories.
Andrea, can you verify that this fixes your issue?
The only concern I have about this is the case where jj files are mixed in with
regular java sources. Then you'd end up with duplicate class errors. This is
not the recommended setup, but it's still possible that some people have
projects set up like that. I guess there is a relatively easy workaround for
it (separating the jj files from the java sources), so if it causes problems
for some people we can add a parameter to turn off the copying in the next
release.
I don't know of any use cases where you would want to call jjtree without
calling javacc afterwards. It might even make sense to have the jjtree mojo
automatically call javacc afterwards just so you don't have to configure the
separate execution in your pom. But I think that's an issue for a future
release.
> Cannot get javacc plugin to work on windows
> -------------------------------------------
>
> Key: MJAVACC-53
> URL: http://jira.codehaus.org/browse/MJAVACC-53
> Project: Maven 2.x JavaCC Plugin
> Issue Type: Bug
> Components: javacc, jjtree
> Affects Versions: 2.2
> Reporter: Andrea Aime
> Assignee: Paul Gier
> Fix For: 2.3
>
> Attachments: jjtree-javacc-pipeline-it.patch, jjtreebug.zip
>
>
> I'm trying to use the javacc plugin without much success.
> If I configure it this way:
> {code:xml}
> <plugin>
> <groupId>org.codehaus.mojo</groupId>
> <artifactId>javacc-maven-plugin</artifactId>
> <version>2.2</version>
> <executions>
> <execution>
> <goals>
> <goal>jjtree</goal>
> </goals>
> </execution>
> </executions>
> <configuration>
>
> <sourceDirectory>src/main/java/org/geoserver/wcs/kvp/rangesubset</sourceDirectory>
> <outputDirectory>target/generated-sources/jjtree</outputDirectory>
> </configuration>
> </plugin>
> {code}
> the build fails reporting that:
> {code}
> ...
> File
> "target\generated-sources\jjtree\org\geoserver\wcs\kvp\rangesubset\ASTKey.java"
> does not exist. Will create one.
> Annotated grammar generated successfully in
> target\generated-sources\jjtree\org\geoserver\wcs\kvp\rangesubset\rangeset.jj
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO]
> ------------------------------------------------------------------------
> [INFO] JJTree execution failed
> Embedded error:
> C:\progetti\geoserver\src\trunkClean\geoserver\wcs1_1\target\generated-sources\jjtree-timestamp\C:\progetti\geoserver\src\trunkClean\geoserver\wcs1_1\src\main\java\org\geoserver\wcs\kvp\rangesubset\rangeset.jjt
> (La sintassi
> del nome del file, della directory o del volume Þ incorretta)
> {code}
> If I configure it so that timestamp directory is more explicit, say
> {{<timestampDirectory>target/generated-sources/jjtree-timestamp</timestampDirectory>}}
> then the jjtree phase works but the parser is not generated. So I guess I'm
> missing the javacc part (no documentation on how to use both javacc and
> jjtree btw), I've tried with this:
> {code}
> <plugin>
> <groupId>org.codehaus.mojo</groupId>
> <artifactId>javacc-maven-plugin</artifactId>
> <version>2.2</version>
> <executions>
> <execution>
> <goals>
> <goal>jjtree</goal>
> </goals>
> </execution>
> </executions>
> <configuration>
>
> <sourceDirectory>src/main/java/org/geoserver/wcs/kvp/rangesubset</sourceDirectory>
> <outputDirectory>target/generated-sources/jjtree</outputDirectory>
>
> <timestampDirectory>target/generated-sources/jjtree-timestamp</timestampDirectory>
> </configuration>
> </plugin>
> <plugin>
> <groupId>org.codehaus.mojo</groupId>
> <artifactId>javacc-maven-plugin</artifactId>
> <version>2.2</version>
> <executions>
> <execution>
> <goals>
> <goal>javacc</goal>
> </goals>
> </execution>
> </executions>
> <configuration>
>
> <sourceDirectory>target/generated-sources/jjtree/org/geoserver/wcs/kvp/rangesubset</sourceDirectory>
> <outputDirectory>target/generated-sources/javacc</outputDirectory>
>
> <timestampDirectory>target/generated-sources/javacc-timestamp</timestampDirectory>
> </configuration>
> </plugin>
> {code}
> but the same error as the first run occurrs...
> It seems to me there is some problems in the code about how to decide wheter
> a path is absolute or not. If that is the problem, File.isAbsolute provides a
> platform independent check for it.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email