I have a mock java class, by default I would like to exclude it from the mvn install command
.
But when I'm working on my local machine I would like to include it in my .war launching by command line something like: mvn clean install -DsomeProperty=true
I added this plugin to my profile:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.10.1</version>
<configuration>
<excludes>
<exclude>**/filter/MockFilter.java</exclude>
</excludes>
<skip>${someProperty}</skip>
</configuration>
</plugin>
But the class is always skipped. How can I include it? I give a try to this and this, but nothing worked.