0

git status shows modified: target/classes/com/abcplusd/util/JSONUtil$1.class after clone and import maven project from github repository.

part of Pom.xml

<build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.6.0</version>
        <configuration>
          <source>1.8</source>
          <target>1.8</target>
          <excludes>
            <exclude>target/maven-status/maven-compiler-plugin/*</exclude>
          </excludes>
        </configuration>
      </plugin>
    </plugins>
    <extensions>
        <extension>
            <groupId>org.springframework.build</groupId>
            <artifactId>aws-maven</artifactId>
            <version>5.0.0.RELEASE</version>
        </extension>
    </extensions>
  </build>
Srini
  • 823
  • 5
  • 10
  • 29

1 Answers1

0

Your problem is that your target folder is located under the folder containing your .git repository. Hence, it appears that Git is viewing changed files from the build process as being something which should be versioned (they should not).

The general solution to this is to change your build target folder to something outside the path which Git manages.

Tim Biegeleisen
  • 502,043
  • 27
  • 286
  • 360
  • Can you please tell me how can move target folder outside the path? – Srini Nov 02 '16 at 12:20
  • Have a look here for how to change your Maven target path: http://stackoverflow.com/questions/3908013/maven-how-to-change-path-to-target-directory-from-command-line – Tim Biegeleisen Nov 02 '16 at 12:27