Is it possible to send arguments to javac through maven compiler plugin?
I want to set three classpaths as a argument to javac but maven returns
[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>
Code:
<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>
I have tried so far classpath=:. , -classpath=:. , -classpath *:.
The other arguments are fine.
question from:
https://stackoverflow.com/questions/65947846/maven-compiler-plugin-send-parameters-to-javac-classpath-or-cp 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…