maven-compiler-plugin icon indicating copy to clipboard operation
maven-compiler-plugin copied to clipboard

[MCOMPILER-456] Create a log file and show effective arguments

Open jira-importer opened this issue 4 years ago • 4 comments

Delany opened MCOMPILER-456 and commented

Allow configuration of a log file for compilation only output, like surefire plugin does. The log file should also include arguments passed to the compiler.

MSbuild has extensive options, like multiple loggers that might be worth adding https://docs.microsoft.com/en-us/visualstudio/msbuild/msbuild-command-line-reference?view=vs-2019


Affects: 3.8.1

jira-importer avatar Feb 18 '21 14:02 jira-importer

Michael Osipov commented

How does MSBuild relate here to Maven?

jira-importer avatar Feb 18 '21 21:02 jira-importer

Delany commented

If you want to go to Xanadu, and someone else already travelled there, surely your best preparation is to ask them about their trip?

jira-importer avatar Feb 19 '21 04:02 jira-importer

Delany commented

I found the javac non-standard argument to redirect stdout. But the default compiler won't accept it, and I have to fork the build

<configuration>
  <fork>true</fork>
  <compilerArgs combine.children="append">
    <arg>-Xstdout</arg>
    <arg>${project.build.directory}/javac.log</arg>
  </compilerArgs>
</configuration>

This increases the build time of my 500 module reactor from 5min to 20min.

Should this rather be a "fork compiler once for reactor" ticket?

jira-importer avatar Feb 24 '21 10:02 jira-importer

Delany commented

https://maven.apache.org/surefire/maven-surefire-plugin/test-mojo.html#reuseForks

 

jira-importer avatar Mar 16 '21 13:03 jira-importer