Excluding A Module

If for some reason a dependency which is declared in the pom of the project needs to be excluded, the excluded flag could be used as follows:

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-ear-plugin</artifactId>
        <version>2.5</version>
        <configuration>
           [...]
           <modules>
             <webModule>
               <groupId>artifactGroupId</groupId>
               <artifactId>artifactId</artifactId>
               <excluded>true</excluded>
             </webModule>
          </modules>
        </configuration>
      </plugin>
    </plugins>
  </build>