Browse Source

Use a separate build directory for Eclipse.

The fact that Maven and Eclipse share the same build directories can trigger
race conditions when both are trying to build at the same time, eg. if you run
`mvn clean test` while Eclipse is up and running: Eclipse will notice that some
class files are missing and start compiling in parallel with Maven.
Adrien Grand 12 years ago
parent
commit
5b6be0c456
2 changed files with 8 additions and 0 deletions
  1. 1 0
      .gitignore
  2. 7 0
      pom.xml

+ 1 - 0
.gitignore

@@ -18,6 +18,7 @@ docs/build.log
 ## will correctly set the classpath based on the declared dependencies.
 .project
 .classpath
+eclipse-build
 */.project
 */.classpath
 */eclipse-build

+ 7 - 0
pom.xml

@@ -970,6 +970,13 @@
                         </lifecycleMappingMetadata>
                     </configuration>
                 </plugin>
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-eclipse-plugin</artifactId>
+                    <configuration>
+                      <buildOutputDirectory>eclipse-build</buildOutputDirectory>
+                    </configuration>
+                </plugin>
             </plugins>
         </pluginManagement>
     </build>