lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Doron Cohen (JIRA)" <>
Subject [jira] Updated: (LUCENE-814) javacc on Win32 (cygwin) creates wrong line endings - fix them with 'ant replace'
Date Tue, 06 Mar 2007 06:58:24 GMT


Doron Cohen updated LUCENE-814:

    Attachment: 814.javacc.fixcrlf.common-build.patch

I need to refine this claim - if I delete 4 of these 7 files -,,, - and run "ant javacc-QueryParser" - those files are not created.
But if I then modify QueryParser.jj or delete, all missing files are created
(though 3 of them remain unmodified if they exist). So when you run "and javacc", the "clean-javacc"
target guarantees that any missing/outdated file out of these 7 files is created/updated.

By JavaCC's FAQ "What files does JavaCC produce?"
- some of the files are generated only if they do not exist, allowing to edit these ("boiler
plate") files without losing the edits by mistake.

So it  would be safest to require both - regexp and the modification time.
The updated patch do both.

> javacc on Win32 (cygwin) creates wrong line endings - fix them with 'ant replace'
> ---------------------------------------------------------------------------------
>                 Key: LUCENE-814
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Task
>          Components: Build
>         Environment: Windows, Cygwin
>            Reporter: Doron Cohen
>         Assigned To: Doron Cohen
>            Priority: Minor
>             Fix For: 2.2
>         Attachments: 814.javacc.fixcrlf.common-build.patch, 814.javacc.fixcrlf.common-build.patch,
814.javacc.fixcrlf.common-build.patch, 814.javacc.line.ends.patch, LUCENE-814.txt, LUCENE-814.txt
> "ant javacc" in Windows/Cygwin generates files with wrong line endings (\r  or \r\n instead
of *Nix's \n). 
> I managed to get rid of those using    perl -p -e 's/(\r\n|\n|\r)/\n/g'
> Some useful info on line ending issues is in
> After wasting some time to get rid of those, I modified javacc-QueryParser build.xml
task to take care of that.
> So now QueryParser files created with "ant javacc" are fixed (if required) to have \n
as line ends.
> Should probably do that also for the other javacc targets: javacc-HTMLParser and javacc-StandardAnalyzer(?)

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message