Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse auto-build output interacts with Maven command-line build output

Since both use the target directory, Eclipse's build output sometimes interferes with the output of mvn builds run at the command line.

What's the best way to separate the two outputs?

like image 751
Chris Beach Avatar asked Apr 18 '12 11:04

Chris Beach


1 Answers

Insert the following into your pom.xml. Eclipse's "m2e.version" property will activate the following profile which alters the location of the Eclipse build

<profiles>
  <profile>
    <id>IDE</id>
    <activation>
      <property>
        <name>m2e.version</name>
      </property>
    </activation>
    <build>
      <!-- Put the IDE's build output in a folder other than target, so that IDE builds don't interact with Maven builds -->
      <directory>target-ide</directory>
    </build>
  </profile>
</profiles>
like image 83
Chris Beach Avatar answered Nov 07 '22 02:11

Chris Beach