I have a maven pom.xml for a project, which does not use inheritance. I want to skip 1 test sometimes. I want to run mvn -P jenkins
and have the following enabled:
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.18.1</version>
<configuration>
<excludes>
<exclude>**/TestToSkip.java</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
Can I just have:
<profiles>
<profile>
<id>profile-1</id>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.18.1</version>
<configuration>
<excludes>
<exclude>**/TestToSkip.java</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</profile>
</profiles>
at the top of the POM and override just the plugins, or do I need to copy my whole configuration (resources, testResources, etc) into the profile block of XML?