Java: Compilation failed: internal java compiler error with javac on Intellij

MR is now opened: Resolve "Fix IntelliJ compilation issue" (!1178) · Merge requests · Orekit / Orekit · GitLab.

What was done:

  • Move com.sun.source.util.Plugin from src/main/resources to src/main/plugin-descriptor
  • In maven-resources-plugin, add a new step to copy com.sun.source.util.Plugin from src/main/plugin-descriptor to project build directory
  • Move -Xplugin:dataContextPlugin from default maven-compiler-plugin to a dedicated data-context-plugin profile that automatically detects if IntelliJ’s build i being used
    • If true, skip this argument
    • If not, re-add it to preserve original behaviour

Hence, when reloading & rebuilding project in intellij, the .idea/compiler.xml does not re-add -Xplugin:dataContextPlugin.

Plugin is still activated in CI and with standard maven build :ok_hand:

You may want to take a look @evan.ward since you made the plugin.

Cheers,
Vincent