maven - Maven 编译器插件 - 将参数发送到 javac(类路径或 cp)
问题描述
是否可以通过 maven 编译器插件向 javac 发送参数?
我想将三个类路径设置为 javac 的参数,但 maven 返回
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project wplex-frameworks: Compilation failure
[ERROR] javac: invalid flag: classpath=*:.
[ERROR] Usage: javac <options> <source files>
代码:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler.version}</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<fork>true</fork>
<executable>/usr/lib/jvm/java-8-openjdk-amd64/bin/javac</executable>
<compilerArgs>
<arg>classpath=*:.</arg>
<arg>-verbose</arg>
<arg>-Xlint:all,-options,-path</arg>
</compilerArgs>
<excludes>
<exclude>x/y/z/**</exclude>
</excludes>
</configuration>
</plugin>
到目前为止,我已经尝试过 classpath= :. ,-类路径=:。, -类路径 *:。
其他论据都很好。
解决方案
推荐阅读
- javascript - 使用 Javascript 发送图像列表作为响应
- ggplot2 - 为什么我的 y 值没有显示在时间序列(条形图)中?
- flutter - 即使我的应用程序已关闭,我如何显示它的flushbar通知
- tensorflow - 如何从 keras 层的输出中打印数据?
- post - HTTPs 方法 VS Web 套接字
- c - 当输入很大时,c程序出现分段错误
- python - 获取测试套件中每个测试的 SQL 查询计数概览
- ruby-on-rails - 在 Rails 应用程序中获取 Cookie 溢出(REDMINE)
- google-chrome-extension - Chrome 扩展程序 - 抓取任何 url,忽略沙盒和内容安全策略?
- hibernate - 休眠搜索在服务器启动时创建不必要的线程来索引数据。使用默认的“hibernate.search.autoregister_listeners”配置