[ 
https://issues.apache.org/jira/browse/LUCENE-814?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Doron Cohen updated LUCENE-814:
-------------------------------

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

Steven, thanks, this works for me too. 

I usually run ant from Emacs (Win) rather from cygwin, so after Chris's comment 
I thought that this was the cause. But I checked again - in this regard running 
from Emacs and from Cygwin shell behaves the same. 

So I think this is the right approach (as Chris suggested: not specifying crlf 
style, falling to native style).

One thing with the Java files created by javaCC - QueryParserConstants.java can 
also be created by the JavaCC parser. Truth is I don't know enough about JavaCC 
to tell which other files it can generate. So I moved that logic to the macro 
in common-build, so that crlf are fixed for all the Java files that were 
modified  by (current run of) JavaCC.

Attaching 814.javacc.fixcrlf.common-build.patch with this approach.  

> javacc on Win32 (cygwin) creates wrong line endings - fix them with 'ant 
> replace'
> ---------------------------------------------------------------------------------
>
>                 Key: LUCENE-814
>                 URL: https://issues.apache.org/jira/browse/LUCENE-814
>             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.line.ends.patch, 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 
> http://en.wikipedia.org/wiki/Newline
> 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to