How can I prevent sql-maven-plugin
from executing when doing mvn clean install
from the command line? I cannot touch the pom file.
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 a property
attribute to the @Parameter
annotation.