Arguments for eclipse compiler in Maven

In the standalone Eclipse compiler for Java, I can inject compilation information into XML through a command line attribute, as in this stub:

java -jar ecj-4.3.2.jar -log compile.xml <classpath,files>

However, when I use maven-compiler-plugin with plexus-compiler-eclipse, it seems that I can not pass this argument to the compiler, and I'm not sure why this is because the plugin compiler is different, it does not spawn new processes (I even tried an executable parameter) or for another reason.

Here is the pom.xml section:

<plugin>
   <groupId>org.apache.maven.plugins</groupId>
   <artifactId>maven-compiler-plugin</artifactId>
   <version>3.1</version>
   <configuration>
      <compilerId>eclipse</compilerId>
      <forceJavacCompilerUse>true</forceJavacCompilerUse>
      <!--<compilerArgument> -log compile.xml </compilerArgument>-->
      <compilerArgs>
        <arg>-log</arg>
        <arg>compile.xml</arg>
      </compilerArgs>
      <fork>true</fork>
      <verbose>true</verbose>
      <showDeprecation>true</showDeprecation>
      <showWarnings>true</showWarnings>
   </configuration>
   <dependencies>
      <dependency>
         <groupId>org.codehaus.plexus</groupId>
         <artifactId>plexus-compiler-eclipse</artifactId>
         <version>2.3</version>
      </dependency>
   </dependencies>
</plugin>
+4
source share
1 answer

eclipse plexus-compiler-eclipse, fork, jvm. , jvm, MAVEN_OPTS.

plexus-compiler-javac, executable. : fork true executable.

wraper bash : fooobar.com/questions/1531012/...

0

Source: https://habr.com/ru/post/1531011/


All Articles