activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hiram Chirino <hi...@hiramchirino.com>
Subject Re: generated source added to repo?
Date Thu, 22 Dec 2005 16:26:44 GMT

On Dec 22, 2005, at 10:17 AM, Bill Dudney wrote:

> Hi All,
>
> While trying to get the latest updates to build with maven 2 I was  
> getting compile errors complaining about duplicate class errors.
>
> I believe that problem lies first in a bug in the configuration of  
> the javacc plugin (in activemq-core/pom.xml) and second that the  
> generated files have been added to SVN.
>
> After a clean checkout and mvn package from the activemq-core  
> directory the following two files are modified;
>
> M      src/main/java/org/activemq/selector/ 
> SelectorParserTokenManager.java
> M      src/main/java/org/activemq/selector/SelectorParser.java
>

Seems that the javacc version used in m1 and m2 are different and  
they generate different parsers.  Once we check in the changed source  
files, svn should not mark these as being changed anymore.

> The javacc plugin is being told to write the source code into the  
> src/main directory instead of somewhere in 'target'. The other 4  
> files are not regenerated (javacc is logging that they already  
> exist, not sure why it regenerates these two every time).
>
> If the entire src/main/java/org/activemq/selector directory is  
> deleted and the <outputDirectory> element is commented out from the  
> pom then the parser is still generated but in the target directory.
>
> I'd be glad to generate another patch for the m2 build stuff but I  
> want to proceed with how you all want it to look. Here are a couple  
> of possible solutions
>
> 1) exclude the src/main/java/org/activemq/selector directory from  
> svn with svn:ignore and continue to generate code into that  
> directory (not the maven way but it works)
> 2) patch the pom and remove the outputDirectory element, have the  
> src generated into the target directory (more the maven way) - if  
> we do this the selector directory should be deleted from svn  
> because it causes duplicate class compile errors.
>
> There is also a small problem with the <sourceDirectory> element.  
> It works fine when the build is run from the activemq-core  
> directory but does not work from the top level build (i.e. in the  
> activemq directory). To fix that we need to add ${basedir} to the  
> element like
>
>               <sourceDirectory>${basedir}/src/main/grammar</ 
> sourceDirectory>
>

I think this is the easy and simple way to do it for now.  Once  
totally move off m1, re can revisit this.

Regards,
Hiram


> An alternative to making this change is to move the grammar  
> directory to javacc (i.e. src/main/grammar => src/main/javacc) and  
> delete the sourceDirectory element. This move would fall more in  
> line with the maven 2 way but would require changes to the maven 1  
> build bits. Don't you love having choices :-)
>
> TTFN,
>
> Bill Dudney
> MyFaces - myfaces.apache.org
> Wadi - incubator.apache.org/wadi
>
>


Mime
View raw message