Fork me on GitHub

Integrated Development Environment

How to disable goals on incremental builds in the Eclipse IDE?

M2Eclipse is an Eclipse plugin which provides tight integration for Maven. It determines who and when plugins should be executed. Each plugin can store lifecycle mapping metadata with data on which it based its decision (see M2E compatible maven plugins). By default this plugin is called on full and incremental builds. If you want to disable automatic goals executions, then you need to add the following entry to your pom.xml:

<pluginManagement>
   <plugins>
      <plugin>
         <groupId>org.eclipse.m2e</groupId>
         <artifactId>lifecycle-mapping</artifactId>
         <version>1.0.0</version>
         <configuration>
            <lifecycleMappingMetadata>
               <pluginExecutions>
                  <pluginExecution>
                     <pluginExecutionFilter>
                        <groupId>biz.gabrys.maven.plugins</groupId>
                        <artifactId>directory-content-maven-plugin</artifactId>
                        <versionRange>[0,)</versionRange>
                        <goals>
                           ...
                        </goals>
                     </pluginExecutionFilter>
                     <action>
                        <execute>
                           <runOnIncremental>false</runOnIncremental>
                        </execute>
                     </action>
                  </pluginExecution>
               </pluginExecutions>
            </lifecycleMappingMetadata>
         </configuration>
      </plugin>
   </plugins>
</pluginManagement>

[top]