You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Robert Scholte (JIRA)" <ji...@apache.org> on 2018/05/11 19:02:00 UTC
[jira] [Comment Edited] (MCOMPILER-340) Give a clear error when
compiler can't find the JDK
[ https://issues.apache.org/jira/browse/MCOMPILER-340?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16472397#comment-16472397 ]
Robert Scholte edited comment on MCOMPILER-340 at 5/11/18 7:01 PM:
-------------------------------------------------------------------
{{settings.xml}} had
{code:xml}
<profile>
<id>local-jdk</id>
<properties>
<java8.home>C:\projects\tools\jdk1.8.0_172</java8.home>
<java7.home>C:\projects\tools\jdk1.7.0_80</java7.home>
</properties>
</profile>
{code}
where I didn't have the 1.8 _172 JDK installed.
was (Author: cap10bill):
settings.xml had
<profile>
<id>local-jdk</id>
<properties>
<java8.home>C:\projects\tools\jdk1.8.0_172</java8.home>
<java7.home>C:\projects\tools\jdk1.7.0_80</java7.home>
</properties>
</profile>
where I didn't have the 1.8 _172 JDK installed.
> Give a clear error when compiler can't find the JDK
> ---------------------------------------------------
>
> Key: MCOMPILER-340
> URL: https://issues.apache.org/jira/browse/MCOMPILER-340
> Project: Maven Compiler Plugin
> Issue Type: Bug
> Affects Versions: 3.5.1
> Reporter: Cap10Bill
> Priority: Major
>
> I had an issue where my settings.xml pointed to a JDK that didn't exist and I received the following error (Below) which wasn't very helpful.
> The error should have been more clear about not finding JDK
> Additionally the link the exception wasn't very helpful
> {noformat}
> [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.3:compile (default-compile) on project schedulesyncservice-s
> chema: Compilation failure -> [Help 1]
> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.3:compile (d
> efault-compile) on project schedulesyncservice-schema: Compilation failure
> at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:213)
> at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
> at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
> at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
> at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
> at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
> at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
> at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
> at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
> at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
> at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
> at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
> at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
> at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke (Method.java:497)
> at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
> at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
> at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
> at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
> Caused by: org.apache.maven.plugin.compiler.CompilationFailureException: Compilation failure
> at org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute (AbstractCompilerMojo.java:915)
> at org.apache.maven.plugin.compiler.CompilerMojo.execute (CompilerMojo.java:129)
> at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
> at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)
> at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
> at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
> at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
> at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
> at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
> at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
> at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
> at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
> at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
> at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
> at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
> at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
> at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke (Method.java:497)
> at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
> at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
> at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
> at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
> [ERROR]
> [ERROR]
> [ERROR] For more information about the errors and possible solutions, please read the following articles:
> [ERROR] [Help 1] [http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException]
> {noformat}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)