Maven exclude plugin defined in parent pom

maven

I have a parent pom with a few plugins. In my child pom, I want to exclude one plugin.

How can I do this?

Best Answer

I had a similar requirement to run some plugins in the child but not the parent POM. i achieved this by stating <skip>true</skip> in the parent POM.

the parent pom entry is below

<plugin>
        <groupId>eviware</groupId>
        <artifactId>maven-soapui-plugin</artifactId>
        <version>4.0.0</version>
        <inherited>false</inherited>
        <dependencies>
          <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.8.2</version>
          </dependency>
        </dependencies> 
        <configuration>
          <skip>true</skip>
        </configuration>
      </plugin> 

The child project pom entry is below

<plugins>
        <plugin>
            <groupId>eviware</groupId>
            <artifactId>maven-soapui-plugin</artifactId>
            <version>4.0.0</version>
            <configuration>
                <settingsFile>site-service-web/src/test/soapui/soapui-settings.xml</settingsFile>
                <projectFile>site-service-web/src/test/soapui/PodifiSite-soapui-project.xml</projectFile>
                <outputFolder>site-service-web/target/surefire-reports</outputFolder>
                <junitReport>true</junitReport>
                <exportwAll>true</exportwAll>
                <printReport>true</printReport>
            </configuration>
        </plugin>
    </plugins>