Mailing List Archive

JavaCC.zip
Hi,

Since javacc is not part of the distribution anymore, I'd like to suggest some changes in the configuration files, in order to have
things working with no need to copy JavaCC.zip to the lib dir.

I'm not familiar with Ant (just started using it) so I don't know if any previous version looked automatically for .ant.properties
files. The one I'm running (1.4.1 on Win2K) don't, so I had to change build.xml. With the change, everything works now as described
in the error message displayed when no JavaCC.zip is found.

Here are the patches:

Index: build.xml
===================================================================
RCS file: /home/cvspublic/jakarta-lucene/build.xml,v
retrieving revision 1.19
diff -u -r1.19 build.xml
--- build.xml 27 Jan 2002 23:20:04 -0000 1.19
+++ build.xml 11 Feb 2002 00:33:23 -0000
@@ -2,6 +2,8 @@

<project name="Lucene" default="jar" basedir=".">

+ <property file="${user.home}/.ant.properties"/>
+ <property file=".ant.properties"/>
<property file="${user.home}/build.properties"/>
<property file="build.properties"/>

Index: .cvsignore
===================================================================
RCS file: /home/cvspublic/jakarta-lucene/.cvsignore,v
retrieving revision 1.1
diff -u -r1.1 .cvsignore
--- .cvsignore 18 Sep 2001 16:31:51 -0000 1.1
+++ .cvsignore 11 Feb 2002 00:32:10 -0000
@@ -1,3 +1,4 @@
bin
*~
velocity.log
+.ant.properties


--
To unsubscribe, e-mail: <mailto:lucene-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-dev-help@jakarta.apache.org>
Re: JavaCC.zip [ In reply to ]
I don't know that user.home is the most appropriate place to put it. I'm
going to submit a patch for consideration when I get home (after Saturday)
to eliminate the ant.properties file all together in favor of including the
properties in build.xml itself. This seems to be more standard these days.

>On Sun, 10 Feb 2002 22:42:41 -0300 "Daniel Calvo" <dcalvo@ig.com.br> wrote.
>Hi,
>
>Since javacc is not part of the distribution anymore, I'd like to suggest
some changes in the configuration files, in order to have
>things working with no need to copy JavaCC.zip to the lib dir.
>
>I'm not familiar with Ant (just started using it) so I don't know if any
previous version looked automatically for .ant.properties
>files. The one I'm running (1.4.1 on Win2K) don't, so I had to change
build.xml. With the change, everything works now as described
>in the error message displayed when no JavaCC.zip is found.
>
>Here are the patches:
>
>Index: build.xml
>===================================================================
>RCS file: /home/cvspublic/jakarta-lucene/build.xml,v
>retrieving revision 1.19
>diff -u -r1.19 build.xml
>--- build.xml 27 Jan 2002 23:20:04 -0000 1.19
> build.xml 11 Feb 2002 00:33:23 -0000
>@@ -2,6 2,8 @@
>
> <project name="Lucene" default="jar" basedir=".">
>
> <property file="${user.home}/.ant.properties"/>
> <property file=".ant.properties"/>
> <property file="${user.home}/build.properties"/>
> <property file="build.properties"/>
>
>Index: .cvsignore
>===================================================================
>RCS file: /home/cvspublic/jakarta-lucene/.cvsignore,v
>retrieving revision 1.1
>diff -u -r1.1 .cvsignore
>--- .cvsignore 18 Sep 2001 16:31:51 -0000 1.1
> .cvsignore 11 Feb 2002 00:32:10 -0000
>@@ -1,3 1,4 @@
> bin
> *~
> velocity.log
> .ant.properties
>
>
>--
>To unsubscribe, e-mail:
<mailto:lucene-dev-unsubscribe@jakarta.apache.org>
>For additional commands, e-mail:
<mailto:lucene-dev-help@jakarta.apache.org>
>


--
To unsubscribe, e-mail: <mailto:lucene-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-dev-help@jakarta.apache.org>
Re: JavaCC.zip [ In reply to ]
----- Original Message -----
From: "acoliver" <acoliver@nc.rr.com>

> I don't know that user.home is the most appropriate place to put it. I'm
> going to submit a patch for consideration when I get home (after Saturday)
> to eliminate the ant.properties file all together in favor of including
the
> properties in build.xml itself. This seems to be more standard these
days.

Big +1 (not that my vote counts)

If you need any Ant "best practices" guidance I'd be happy to help out. I
was cringing when tweaking the Lucene build.xml and build.properties.
build.properties should not be there by default, and added if a user needs
to customize something. Only build.xml should be needed to build a system.
Many projects include a build.properties.sample file that documents settings
that can be changed and such - so perhaps just put all the properties into
build.xml, comment out ("#") the properties in build.properties (so they
aren't enabled by default) and then rename it to build.properties.sample.

Erik



--
To unsubscribe, e-mail: <mailto:lucene-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-dev-help@jakarta.apache.org>
RE: JavaCC.zip [ In reply to ]
Hi,

It would be easier to have the property in build.properties (which in fact already contains a definition for javacc.home as '.' --
this worked fine when JavaCC.zip was in the lib dir but, unfortunately, this is not the case anymore). I haven't done this for 2
reasons: first, to comply with the message displayed when no JavaCC.zip is found (maybe it should be changed anyway), and second,
because there's a small chance that this can cause conflicts when updating the file via CVS, if the property's value is changed if
the repository. Since I don't think this will ever happen (at least not on purpose), my vote is to keep javacc.home configured in
build.properties (of course, the error message would have to be changed accordingly).

Regards,

--Daniel

> -----Original Message-----
> From: acoliver [mailto:acoliver@nc.rr.com]
> Sent: terca-feira, 12 de fevereiro de 2002 16:10
> To: lucene-dev@jakarta.apache.org
> Subject: Re: JavaCC.zip
>
>
> I don't know that user.home is the most appropriate place to put it. I'm
> going to submit a patch for consideration when I get home (after Saturday)
> to eliminate the ant.properties file all together in favor of including the
> properties in build.xml itself. This seems to be more standard these days.
>
> >On Sun, 10 Feb 2002 22:42:41 -0300 "Daniel Calvo" <dcalvo@ig.com.br> wrote.
> >Hi,
> >
> >Since javacc is not part of the distribution anymore, I'd like to suggest
> some changes in the configuration files, in order to have
> >things working with no need to copy JavaCC.zip to the lib dir.
> >
> >I'm not familiar with Ant (just started using it) so I don't know if any
> previous version looked automatically for .ant.properties
> >files. The one I'm running (1.4.1 on Win2K) don't, so I had to change
> build.xml. With the change, everything works now as described
> >in the error message displayed when no JavaCC.zip is found.
> >
> >Here are the patches:
> >
> >Index: build.xml
> >===================================================================
> >RCS file: /home/cvspublic/jakarta-lucene/build.xml,v
> >retrieving revision 1.19
> >diff -u -r1.19 build.xml
> >--- build.xml 27 Jan 2002 23:20:04 -0000 1.19
> > build.xml 11 Feb 2002 00:33:23 -0000
> >@@ -2,6 2,8 @@
> >
> > <project name="Lucene" default="jar" basedir=".">
> >
> > <property file="${user.home}/.ant.properties"/>
> > <property file=".ant.properties"/>
> > <property file="${user.home}/build.properties"/>
> > <property file="build.properties"/>
> >
> >Index: .cvsignore
> >===================================================================
> >RCS file: /home/cvspublic/jakarta-lucene/.cvsignore,v
> >retrieving revision 1.1
> >diff -u -r1.1 .cvsignore
> >--- .cvsignore 18 Sep 2001 16:31:51 -0000 1.1
> > .cvsignore 11 Feb 2002 00:32:10 -0000
> >@@ -1,3 1,4 @@
> > bin
> > *~
> > velocity.log
> > .ant.properties
> >
> >
> >--
> >To unsubscribe, e-mail:
> <mailto:lucene-dev-unsubscribe@jakarta.apache.org>
> >For additional commands, e-mail:
> <mailto:lucene-dev-help@jakarta.apache.org>
> >
>
>
> --
> To unsubscribe, e-mail: <mailto:lucene-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:lucene-dev-help@jakarta.apache.org>
>


--
To unsubscribe, e-mail: <mailto:lucene-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-dev-help@jakarta.apache.org>