You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hivemind.apache.org by Stefan Bodewig <bo...@apache.org> on 2004/07/27 12:05:18 UTC

Trying to build Hivemind in Gump

Hi,

I'm in the process of "gumping"[1] Hivemind in order to build Tapestry
later.  My current biggest obstacle is JavaCC.

Hivebuild wants to download and use a rather old version of JavaCC
(1.x or 2.x, dunno) and Gump uses the 3.1 version from java.net[2].
While Ant deals with all JavaCC versions happily, I'd have to point
the <javacc> task to a different javacchome.

Unfortunately javacchome is coupled to external.package.dir in
hivebuild and I'd also send hivebuild download all other stuff into my
local JavaCC installation if I changed it.

The appended patch will retain all current functionality but will also
allow me to override the JavaCC version with a property.  Please
consider applying the path.

The alternative would be to rewrite the Ant task so it uses its
classpath instead of the filename to determine which JavaCC version it
is dealing with.

Cheers

        Stefan

Footnotes: 
[1]  http://gump.apache.org/

[2]  https://javacc.dev.java.net/

Index: hivebuild/javacc.properties
===================================================================
RCS file: /home/cvspublic/jakarta-hivemind/hivebuild/javacc.properties,v
retrieving revision 1.1
diff -u -r1.1 javacc.properties
--- hivebuild/javacc.properties	11 Jul 2004 17:14:43 -0000	1.1
+++ hivebuild/javacc.properties	27 Jul 2004 10:03:18 -0000
@@ -18,4 +18,5 @@
 
 # The file to which the JavaCC distribution is downloaded.
 
-javacc.dist.zip=${external.package.dir}/JavaCC.zip
\ No newline at end of file
+javacc.dist.zip=${external.package.dir}/JavaCC.zip
+javacc.home=${external.package.dir}
\ No newline at end of file
Index: hivebuild/javacc.xml
===================================================================
RCS file: /home/cvspublic/jakarta-hivemind/hivebuild/javacc.xml,v
retrieving revision 1.1
diff -u -r1.1 javacc.xml
--- hivebuild/javacc.xml	11 Jul 2004 17:14:43 -0000	1.1
+++ hivebuild/javacc.xml	27 Jul 2004 10:03:18 -0000
@@ -37,7 +37,7 @@
 				<!-- JavaCC is stupid; we have to tell it about package directories, which is stupid. -->
 			
 				<javacc
-					javacchome="${external.package.dir}"
+					javacchome="${javacc.home}"
 					target="@{input}"
 					outputdirectory="${generated-java.src.dir}/@{package-path}"/>
 									

---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org


Re: Trying to build Hivemind in Gump

Posted by Stefan Bodewig <bo...@apache.org>.
On Tue, 27 Jul 2004, James Carman <ja...@carmanconsulting.com> wrote:

> Doesn't JavaCC generate code that is not dependant upon the JavaCC
> library itself?

I think so.  That's why I said you could probably upgrade.  It's just
that the build system won't allow me to tell Ant that I want to use
JavaCC 3.1 instead of 2.0 (right now).  The result for Hivemind is
supposed to be the same.

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org


Re: Trying to build Hivemind in Gump

Posted by Stefan Bodewig <bo...@bost.de>.
On Tue, 27 Jul 2004, James Carman <ja...@carmanconsulting.com> wrote:

> Doesn't JavaCC generate code that is not dependant upon the JavaCC
> library itself?

I think so.  That's why I said you could probably upgrade.  It's just
that the build system won't allow me to tell Ant that I want to use
JavaCC 3.1 instead of 2.0 (right now).  The result for Hivemind is
supposed to be the same.

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org


RE: Trying to build Hivemind in Gump

Posted by James Carman <ja...@carmanconsulting.com>.
Doesn't JavaCC generate code that is not dependant upon the JavaCC library
itself?  I haven't used it in a long time and I don't remember.  So, the
package naming shouldn't really matter to hivemind.  The only package name
that it has to worry about is the package name that it tells JavaCC to use
when generating code, right?  Again, I'm no JavaCC expert, but I would hope
that you don't need the JavaCC classes around in order to use the generated
code.  As a matter of fact, I don't remember having to put JavaCC in my
classpath when using HiveMind, so I'm pretty sure that's the case.  Anyway,
I think this is the simplest approach, as it really should have the least
impact in things.   

-----Original Message-----
From: Stefan Bodewig [mailto:bodewig@apache.org] 
Sent: Tuesday, July 27, 2004 7:11 AM
To: hivemind-dev@jakarta.apache.org
Subject: Re: Trying to build Hivemind in Gump

On Tue, 27 Jul 2004, James Carman <ja...@carmanconsulting.com> wrote:

> Could we not upgrade HiveMind to use the newer version of JavaCC
> instead of adding that complexity?

I don't know, I think you can, but I'm not sure whether it is
available via ibiblio.

> Isn't JavaCC backwards compatible?

The generated code is supposed to be and it looks as if it worked for
hivemind.

At the tool invocation level (Ant's side of things) it isn't since the
package name has changed between 2.0 and 3.1 (twice).

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org


Re: Trying to build Hivemind in Gump

Posted by Stefan Bodewig <bo...@apache.org>.
On Tue, 27 Jul 2004, James Carman <ja...@carmanconsulting.com> wrote:

> Could we not upgrade HiveMind to use the newer version of JavaCC
> instead of adding that complexity?

I don't know, I think you can, but I'm not sure whether it is
available via ibiblio.

> Isn't JavaCC backwards compatible?

The generated code is supposed to be and it looks as if it worked for
hivemind.

At the tool invocation level (Ant's side of things) it isn't since the
package name has changed between 2.0 and 3.1 (twice).

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org


RE: Trying to build Hivemind in Gump

Posted by James Carman <ja...@carmanconsulting.com>.
Could we not upgrade HiveMind to use the newer version of JavaCC instead of
adding that complexity?  Isn't JavaCC backwards compatible?

-----Original Message-----
From: Stefan Bodewig [mailto:bodewig@apache.org] 
Sent: Tuesday, July 27, 2004 6:05 AM
To: hivemind-dev@jakarta.apache.org
Subject: Trying to build Hivemind in Gump

Hi,

I'm in the process of "gumping"[1] Hivemind in order to build Tapestry
later.  My current biggest obstacle is JavaCC.

Hivebuild wants to download and use a rather old version of JavaCC
(1.x or 2.x, dunno) and Gump uses the 3.1 version from java.net[2].
While Ant deals with all JavaCC versions happily, I'd have to point
the <javacc> task to a different javacchome.

Unfortunately javacchome is coupled to external.package.dir in
hivebuild and I'd also send hivebuild download all other stuff into my
local JavaCC installation if I changed it.

The appended patch will retain all current functionality but will also
allow me to override the JavaCC version with a property.  Please
consider applying the path.

The alternative would be to rewrite the Ant task so it uses its
classpath instead of the filename to determine which JavaCC version it
is dealing with.

Cheers

        Stefan

Footnotes: 
[1]  http://gump.apache.org/

[2]  https://javacc.dev.java.net/

Index: hivebuild/javacc.properties
===================================================================
RCS file: /home/cvspublic/jakarta-hivemind/hivebuild/javacc.properties,v
retrieving revision 1.1
diff -u -r1.1 javacc.properties
--- hivebuild/javacc.properties	11 Jul 2004 17:14:43 -0000	1.1
+++ hivebuild/javacc.properties	27 Jul 2004 10:03:18 -0000
@@ -18,4 +18,5 @@
 
 # The file to which the JavaCC distribution is downloaded.
 
-javacc.dist.zip=${external.package.dir}/JavaCC.zip
\ No newline at end of file
+javacc.dist.zip=${external.package.dir}/JavaCC.zip
+javacc.home=${external.package.dir}
\ No newline at end of file
Index: hivebuild/javacc.xml
===================================================================
RCS file: /home/cvspublic/jakarta-hivemind/hivebuild/javacc.xml,v
retrieving revision 1.1
diff -u -r1.1 javacc.xml
--- hivebuild/javacc.xml	11 Jul 2004 17:14:43 -0000	1.1
+++ hivebuild/javacc.xml	27 Jul 2004 10:03:18 -0000
@@ -37,7 +37,7 @@
 				<!-- JavaCC is stupid; we have to tell it
about package directories, which is stupid. -->
 			
 				<javacc
-					javacchome="${external.package.dir}"
+					javacchome="${javacc.home}"
 					target="@{input}"
 
outputdirectory="${generated-java.src.dir}/@{package-path}"/>
 									

---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org