Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JavaCompiler has error output, but compile result is true #268

Open
chenxubiao opened this issue Mar 13, 2023 · 0 comments
Open

JavaCompiler has error output, but compile result is true #268

chenxubiao opened this issue Mar 13, 2023 · 0 comments

Comments

@chenxubiao
Copy link

i use mac m1

java -v
openjdk version "1.8.0_362" OpenJDK Runtime Environment (Zulu 8.68.0.21-CA-macos-aarch64) (build 1.8.0_362-b09) OpenJDK 64-Bit Server VM (Zulu 8.68.0.21-CA-macos-aarch64) (build 25.362-b09, mixed mode)

mvn -v
Apache Maven 3.8.7 (b89d5959fcde851dcb1c8946a785a163f14e1e29) Maven home: /opt/homebrew/Cellar/mvnd/0.9.0/libexec Java version: 1.8.0_362, vendor: Azul Systems, Inc., runtime: /Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/jre Default locale: zh_CN, platform encoding: UTF-8 OS name: "mac os x", version: "12.5.1", arch: "aarch64", family: "mac"

pom
maven-compiler-plugin:3.7.0
plexus-compiler-api:2.8.4

javax.tools.JavaCompiler

mvn clean install -Dmaven.test.skip=true

i have some spring-boot java projects. A project dependency B project. B project already built and installed into maven local repository.

when i delete B jar in maven local repository before compiler A, compile has error log output, but compile result is success true.

such as
image

when i see the log [INFO] Compiling 951 source files xxxx, i deleted my local mvn repository dependency jar quickly. rm ~/.m2/xxx/1.0.0-SNAPSHOT/xxx-1.0.0-SNAPSHOT.jar.

and then the bug reproduced.

when i debug this issue
org.codehaus.plexus.compiler.javac.JavaxToolsCompiler#compileInProcess

image

it's looks like a jdk 1.8 bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant