How can I prevent sql-maven-plugin
from executing when doing mvn clean install
from the command line? I cannot touch the pom file.
Asked
Active
Viewed 2,558 times
3
1 Answers
3
The sql-maven-plugin
does provide a skip
property but there is no corresponding user property.
If you can't modify the POM file, there are 2 scenarios:
The plugin is configured like this:
<plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>sql-maven-plugin</artifactId> <version>1.5</version> <!-- dependencies and executions blocks omitted for brevity --> <configuration> <skip>${someProperty}</skip> </configuration> </plugin>
In this case, you can run
mvn clean install -DsomeProperty=true
to skip the execution of the plugin.The plugin is not configured like above. In this case, you're out of luck and you will not be able to skip the execution. Looking at the source code, there is no user property for the
skip
property. Your only move would be to make an enhancement request to implement this at the GitHub repo. You could also provide a pull request: it seems the only change would be to add aproperty
attribute to the@Parameter
annotation.

Tunaki
- 132,869
- 46
- 340
- 423
-
Unfortunately it seems that to be the case. – George Oct 08 '15 at 08:16