【发布时间】:2021-08-21 03:03:27
【问题描述】:
我有一个多模块项目,其中包含很多花里胡哨的东西。例如这个插件:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>${maven.exec.version}</version>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>python3</executable>
<workingDirectory>src/main/python</workingDirectory>
<arguments>
<argument>aggregate.py</argument>
<argument>${}</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
从命令行,我们可以传递-q aka --quiet 之类的标志。对于aggregate.py 的第二个参数,我如何将-q 标志或任何其他标志传递到python 脚本中,以便它在运行时也能服从日志级别的请求?
如果我们只使用自定义参数当然会很容易,但我想使用内置参数以获得更无缝的体验。如何跟踪-q 或--quiet?
【问题讨论】:
标签: java maven command-line-interface pom.xml