[英]Skip sql-maven-plugin execution from command line
How can I prevent sql-maven-plugin
from executing when doing mvn clean install
from the command line?从命令行执行mvn clean install
时,如何防止sql-maven-plugin
执行? I cannot touch the pom file.我无法触摸 pom 文件。
The sql-maven-plugin
does provide askip
property but there is no corresponding user property. sql-maven-plugin
确实提供了一个skip
属性,但没有相应的用户属性。
If you can't modify the POM file, there are 2 scenarios:如果不能修改POM文件,有2种情况:
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.在这种情况下,您可以运行mvn clean install -DsomeProperty=true
跳过插件的执行。
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.查看源代码, skip
属性没有用户属性。 Your only move would be to make an enhancement request to implement this at the GitHub repo .您唯一的举措是提出增强请求以在GitHub 存储库中实现这一点。 You could also provide a pull request: it seems the only change would be to add a property
attribute to the @Parameter
annotation.您还可以提供拉取请求:似乎唯一的更改是向@Parameter
注释添加property
属性。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.