jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jukka Zitting (JIRA)" <j...@apache.org>
Subject [jira] Updated: (JCR-116) JavaCC grammar generation to ${maven.build.dir}/generated-src
Date Thu, 12 May 2005 17:08:22 GMT
     [ http://issues.apache.org/jira/browse/JCR-116?page=all ]

Jukka Zitting updated JCR-116:
------------------------------

    Attachment: jackrabbit-javacc-target-patch2.txt

Attached an updated patch that uses the hack proposed by Fabrizio. The new patch also adds
the maven.gen.src variable to project.properties so that the Maven Eclipse plugin can automatically
locate the generated sources.

The concept of generated sources doesn't seem to be very well handled by Maven. The JavaCC
plugin uses a hardcoded generated-src/main path, the Eclipse plugin uses the ${maven.gen.src}
variable, and both Mevenide and the IDEA plugin seem to be going for their own solutions.

For background, please see the following:

* http://jira.codehaus.org/browse/MPECLIPSE-5
* http://mail-archives.apache.org/mod_mbox/maven-dev/200407.mbox/%3cPKENIMMEAHDAHILNLIJPMELAEMAB.epugh@upstate.com%3e
* http://jira.codehaus.org/browse/MEVENIDE-181
* http://jira.codehaus.org/browse/MPIDEA-10

> JavaCC grammar generation to ${maven.build.dir}/generated-src
> -------------------------------------------------------------
>
>          Key: JCR-116
>          URL: http://issues.apache.org/jira/browse/JCR-116
>      Project: Jackrabbit
>         Type: Wish
>   Components: maven, sql, xpath
>     Reporter: Jukka Zitting
>     Priority: Minor
>  Attachments: jackrabbit-javacc-target-patch.txt, jackrabbit-javacc-target-patch2.txt
>
> Currently the JavaCC grammars in src/grammar/{xpath,sql} are processed into Java source
files in src/java/org/apache/jacrabbit/core/query/{xpath,sql} where we also have normal version
controlled source files. This leads to the need to maintain special svn:ignore properties
and also the more general issue of mixing manually written and automatically generated source
files. Because of this the "maven clean" command does not (at the moment) truly restore your
source tree to a "fresh checkout" state.
> I'm proposing (as a wish, you are free to disagree) that the JavaCC grammars be generated
into Java files within the Maven build directory. The attached patch modifies the javacc maven
goals to generate files into ${maven.build.dir}/generated-src. The modified prepare-filesystem
goal also adds the generated source path ${maven.build.dir}/generated-src/main/java into the
maven compile set so that the generated sources are included in the normal builds.
> PS. There are a couple of JavaCC generated files that have been intentionally modified
for Jackrabbit. The ant:delete commands at the end of the jacrabbit:generate-*-parser goals
specifically remove these generated files. It would however be nicer if custom modifications
would not be needed.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message