[ 
http://jira.codehaus.org/browse/MJAVACC-53?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_121027
 ] 

Andrea Aime commented on MJAVACC-53:
------------------------------------

I've tried various ways, but none seems to work. The closes one is:

{code}
<plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>javacc-maven-plugin</artifactId>
        <version>2.3-SNAPSHOT</version>
        <executions>
          <execution>
            <id>jjtree</id>
            <goals>
              <goal>jjtree</goal>
            </goals>
            <configuration>
              
<sourceDirectory>src/main/java/org/geoserver/wcs/kvp/rangesubset</sourceDirectory>
              <outputDirectory>target/generated-sources/jjtree</outputDirectory>
            </configuration>
          </execution>
          <execution>
            <id>javacc</id>
            <goals>
              <goal>javacc</goal>
            </goals>
            <configuration>
              
<sourceDirectory>target/generated-sources/jjtree/org/geoserver/wcs/kvp/rangesubset</sourceDirectory>
              <outputDirectory>target/generated-sources/javacc</outputDirectory>
            </configuration>
          </execution>
        </executions>
      </plugin>
{code}

but the nodes get generated twice in different directories as well as outside 
the package I specified (yes, I get 3 copies).
How is the plugin supposed to be used? Some documentation would not hurt...

> 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
>             Fix For: 2.3
>
>
> 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

Reply via email to