[MCOMPILER-435] Plugin does not report actual error from ErrorProne when toolchain is used
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 48/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- java
- Domain
- build-system
Research direction
Start with the attached sample project and run ./mvnw clean install, then ./mvnw -Puse-toolchain clean install using JDK 11. Compare how the compiler plugin reports ErrorProne's InvalidCommandLineOptionException with and without the toolchain, and verify that the toolchain case exposes the actual error rather than only "Compilation failure."
Written by the indexing model from the issue text.
Description
Rocher Suchard opened MCOMPILER-435 and commented
Hello,
I followed ErrorProne installation (http://errorprone.info/docs/installation and http://errorprone.info/docs/patching) but I did not provide a -XepPatchCheck which result in an error that maven-compiler-plugin fails to report when a toolchain is used:
Without a toolchain, I get this error which is what I expect, eg: something that helps!
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on
project maven-compiler-plugin-error-prone: Fatal error compiling: -XepPatchChecks and -XepPatchLocation must be specif
ied together -> [Help 1]
With a JDK 11 toolchain, the error won't help, neither the (huge) stacktrace when using -e.
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on
project maven-compiler-plugin-error-prone: Compilation failure -> [Help 1]
maven-compiler-plugin is unable to report correctly the com.google.errorprone.InvalidCommandLineOptionException thrown by ErrorProne when a toolchain is used (in this case, the toolchain is useless, but I have profile with Java 15).
The attached file contains a sample project:
- To test the case when it reports the ErrorProne exception, simply do
./mvnw clean install - To test the case with a JDK 11 toolchain, simply do
./mvnw -Puse-toolchain clean install
Java 11 is both required to build, and as a toolchain.
Affects: 3.8.1
Attachments:
- maven-compiler-plugin-3.13.0-error-prone.zip (12.17 kB)
- maven-compiler-plugin-3.8.1-error-prone.zip (12.94 kB)
- Dominant language
- Java
- Stars
- 261
- Forks
- 194
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 17
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from apache/maven-compiler-plugin
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 45/100
apache/maven-compiler-plugin#1148 · 2 comments ·
Maintainers usually reply within 1 day
-
3.x bug
Difficulty 4/5 3-5 days Newbie friendliness 45/100
apache/maven-compiler-plugin#1140 · 1 comment ·
Maintainers usually reply within 1 day
-
3.x enhancement
Difficulty 3/5 1-2 days Newbie friendliness 68/100
apache/maven-compiler-plugin#1138 ·
Maintainers usually reply within 1 day
-
3.x bug
Difficulty 4/5 3-5 days Newbie friendliness 64/100
apache/maven-compiler-plugin#1137 ·
Maintainers usually reply within 1 day
-
3.x bug
Difficulty 3/5 1-2 days Newbie friendliness 55/100
apache/maven-compiler-plugin#1124 · 1 comment · 3 reactions ·
Maintainers usually reply within 1 day
All issues in apache/maven-compiler-plugin
Similar issues
-
enhancement good first issue
Difficulty 2/5 Half a day Newbie friendliness 66/100
apache/fineract-consumer-facing#175 ·
Maintainers usually reply within 1 day
-
[BUG] 订单:会员凭订单号即可取消其他会员的待付款订单(取消接口不校验订单归属)Possibly taken @dadiyang claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
macrozheng/mall#1016 ·
-
[Bug] The producer summary counts an unreported client version as a second version and warns about a version mixPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
apache/rocketmq-dashboard#6110 ·
Maintainers usually reply within 4 days
-
Feature:Resolution
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
intellij-elixir/intellij-elixir#4396 ·
Maintainers usually reply within 1 day
-
Python 3.15 supportPossibly taken @amnesiaof claimed this today. OpenL: python L: python:uv
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
dependabot/dependabot-core#16524 · 1 comment ·
Maintainers usually reply within 1 day