0

I have a situation where I clone a git repo of a project that includes GWT and then I do a mvn clean install which includes GWT compilation of permutations. After the mvn clean install I do a git status and see a whole slew of "modified" files. But I did not modify any of them. So I do a git diff and they show this warning for various files:

$ git diff -- path/to/file/SomeFile.svg
warning: LF will be replaced by CRLF in path/to/file/SomeFile.svg.
The file will have its original line endings in your working directory

I'm running Windows and my understanding is that warning indicates a mismatch between line endings on Unix (LF) and Windows (CRLF). So it seems the GWT compile stage of the build modifies line endings in those source files.

I also notice the source directories containing these files disappear and get recreated during the build right after the maven logs show: "...Compile of permutations succeeded".

My maven pom.xml uses the gwt-maven-plugin compile goal, configured as follows:

<plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>gwt-maven-plugin</artifactId>
    <executions>
        <execution>
            <goals>
                <goal>compile</goal>
            </goals>
            <configuration>
                <webappDirectory>src/main/webapp/</webappDirectory>
                <failOnError default-value="false">true</failOnError>
                <extraJvmArgs>-Xms128M -Xmx1000M</extraJvmArgs>
                <localWorkers>8</localWorkers>
                <force>true</force>
                <moduleName>com.example.gwt.UIModule</moduleName>
            </configuration>
        </execution>
    </executions>
</plugin>

I'm new to GWT, but assuming this is where the line endings are getting changed, is there a way to configure this so how the GWT compile handles line endings, in order to avoid this? Alternatively, is there something else that could be changing the line endings?

Note this question differs from this and this as neither pertain to GWT compilation.

Woodchuck
  • 3,869
  • 2
  • 39
  • 70
  • The changed files: Are they lf before, crlf after? Or other way round? (Yeah I see the git message but it's direction is not always trustworthy!) – Rusi Feb 22 '19 at 00:48
  • Please include the whole git status output, and do not change any path. GWT compile does not touch your sources, so this must be some other problem. Maybe you are seeing changes in the target folder, or maybe in the src/main/webapp (it should not, but it is possible that GWT compiler generate something it this folder) – Ignacio Baca Mar 02 '19 at 18:02

0 Answers0