[Mulgara-dev] Windows build broken
Alex Hall
alexhall at revelytix.com
Fri Sep 5 15:14:27 UTC 2008
Thanks for the quick response.
Paul Gearon wrote:
> On Fri, Sep 5, 2008 at 9:11 AM, Alex Hall <alexhall at revelytix.com> wrote:
>> I've updated my Mulgara checkout that I have on my Windows laptop, and the
>> project no longer builds. It turns out that "lib\javacc-4.0.jar" is a symbolic
>> link to javacc.jar (represented in SVN using the svn:special property).
>> Unfortunately, Windows SVN clients do not support symbolic links. What I get
>> instead for javacc-4.0.jar is a plain-text file whose contents are "link
>> javacc.jar". Strangely enough, the Java compiler has a problem with this.
>>
>> Can we please come up with a different approach to maintaining library jar
>> versions that does not involve symbolic links?
>
> The fact that your installation on Windows is trying to use this link
> is a complete surprise for me. I don't know if it's because you're
> using a different Ant, or if there's something else happening. The
> "broken link" should matter whatsoever, since javacc-4.0.jar is
> supposed to be an ignored file.
The javacc-4.0.jar was not being used directly by the javacc Ant task. Upon
closer inspection, the source of the problem is in the descriptor Ant script
(src/jar/descriptor/build.xml). Somebody got lazy and added an entry to the
classpath "<fileset dir="${lib.dir}" includes="**/**"/>" so even though the
javacc jar wasn't needed, the compiler still saw javacc-4.0.jar in the classpath
and tried to read it.
> According to Ant, Javacc is only supposed to work if I have the jar in
> the appropriate bin/lib directory under "javacchome". However, someone
> (Simon?) had already found they by putting the jar file directly in
> the javacc home directory, then it gets picked up. That's good, as it
> allowed me to avoid creating new directories in lib.
>
> The problem was that by calling it javacc.jar, there was no easy way
> to know what the version number was. Since Ant only uses javacc.jar
> and not javacc-4.0.jar, I couldn't just rename it (I tried, and it
> told me that it couldn't find the jar). So I created that symlink, as
> a kind of documentation. On Mac and Linux, this symlink is ignored.
> If it weren't, then I would have just renamed the file to
> javacc-4.0.jar.
>
> I've removed that link now. Since this is the only change between head
> and the release, can you get the latest SVN and let me know if it
> builds for you? (I don't have access to Windows ATM)
The build works for me now. If you want to maintain the link as documentation
of the version number, it would probably work as long as all references to any
variation on "lib/*.jar" are removed. Come to think of it, they should probably
be removed anyways for the sake of good programming practices.
Alex
More information about the Mulgara-dev
mailing list