You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[MTOOLCHAINS-35] No javac in jdk toolchain should be an error #99
If the selected jdk toolchain is configured to point to a JRE instead of a JDK, it should fail with an error. Instead there is a warning.
[WARNING] Unable to autodetect 'javac' path, using 'javac' from the environment.
I'm assuming it falls back to whatever javac is available on the system?
Edited to indicate that this only applies to the jdk toolchain, not to all toolchains which might select other things like Eclipse versions that aren't even JDKs at all.
I notice my reactor takes 20min when using the toolchain configured to use /usr/lib/jvm/java-8-openjdk-amd64/bin
I use that same JDK normally and it takes 5min. Watching the logs, its slowing a lot at maven-compiler-plugin. What's it doing, starting a new JVM every time?
I see today that the plugin doesn't even check that its a valid jdkhome, only that the directory exists. The first I know that I'm using the system javac (happens to be jdk8) is when it complains about the --release flag
Activity
jira-importer commentedon Feb 18, 2021
Michael Osipov commented
Regardless of the warning, does a toolchain always require a javac? What if the project does not compile anything? E.g., type
pom.jira-importer commentedon Feb 18, 2021
Delany commented
Ok. But then there should be an enforcer rule to catch this. https://issues.apache.org/jira/browse/MENFORCER-368
Together they work to achieve a desired behavior (MBEHAVIOR anyone?). I still think this is an issue for the toolchain and not the enforcer.
jira-importer commentedon Feb 18, 2021
Delany commented
`Michael Osipov the toolchain type "jdk" should indeed always require a javac. Its not asking much
jira-importer commentedon Feb 18, 2021
Delany commented
I notice my reactor takes 20min when using the toolchain configured to use /usr/lib/jvm/java-8-openjdk-amd64/bin
I use that same JDK normally and it takes 5min. Watching the logs, its slowing a lot at maven-compiler-plugin. What's it doing, starting a new JVM every time?
jira-importer commentedon Aug 27, 2021
Delany commented
I see today that the plugin doesn't even check that its a valid jdkhome, only that the directory exists. The first I know that I'm using the system javac (happens to be jdk8) is when it complains about the --release flag