I am running JavaScript unit tests in a maven project using exec-maven-plugin
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.3</version>
<executions>
<execution>
<id>run-karma</id>
<phase>test</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>${node.bin.folder}/node</executable>
<workingDirectory>${project.basedir}</workingDirectory>
<arguments>
<argument>node_modules/karma/bin/karma</argument>
<argument>start</argument>
<argument>--single-run</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
I was under the assumption that if I passed -DskipTests
, the entire test phase would be skipped but that's not the case, the skipTests
flag is only honored when using "Surefire, Failsafe and the Compiler Plugin"
Question: How can I make that execution depend on the skipTests
flag?