Maven problem

Discussion in 'Plugin Development' started by ARavinMadMonkey, Apr 23, 2014.

Thread Status:
Not open for further replies.
  1. I have been following this tutorial: http://wiki.bukkit.org/Plugin_Tutorial

    I went through the Deploying plugin part, first time I did a Maven Install, it worked fine now, when I try to Maven Install again, I get the following

    Code:
    [ERROR] COMPILATION ERROR :
    [INFO] -------------------------------------------------------------
    [ERROR] Unable to locate the Javac Compiler in:
      C:\Program Files\Java\jre7\..\lib\tools.jar
    Please ensure you are using JDK 1.4 or above and
    not a JRE (the com.sun.tools.javac.Main class is required).
    In most cases you can change the location of your Java
    installation by setting the JAVA_HOME environment variable.
    [INFO] 1 error
    [INFO] -------------------------------------------------------------
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD FAILURE
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 0.677s
    [INFO] Finished at: Thu Apr 24 00:19:33 BST 2014
    [INFO] Final Memory: 5M/122M
    [INFO] ------------------------------------------------------------------------
    [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project ArtifactName: Compilation failure
    [ERROR] Unable to locate the Javac Compiler in:
    [ERROR] C:\Program Files\Java\jre7\..\lib\tools.jar
    [ERROR] Please ensure you are using JDK 1.4 or above and
    [ERROR] not a JRE (the com.sun.tools.javac.Main class is required).
    [ERROR] In most cases you can change the location of your Java
    [ERROR] installation by setting the JAVA_HOME environment variable.
    [ERROR] -> [Help 1]
    [ERROR]
    [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
    [ERROR] Re-run Maven using the -X switch to enable full debug logging.
    [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
    
    (I added in GroupId and ArtifactName, they are correct in the error.)

    Could anyone give me some help?
     
  2. Offline

    thomasb454

    [ERROR] Unable to locate the Javac Compiler in:
    C:\Program Files\Java\jre7\..\lib\tools.jar
    Please ensure you are using JDK 1.4 or above and
    not a JRE (the com.sun.tools.javac.Main class is required).
    In most cases you can change the location of your Java
    installation by setting the JAVA_HOME environment variable.


    Follow this:

    http://www.mkyong.com/maven/how-to-install-maven-in-windows/
     
  3. Offline

    raGan.

    If you are building through eclipse, you don't even need to install maven. Just make sure you tell it to use jdk, not jre. (see path in the picture)
    [​IMG]
     
  4. Thanks, I dont know how I missed that, I checked that screen before I posted here. Thanks again. And thomasb454 too.
     
  5. Offline

    thomasb454


    No problem. :p
     
Thread Status:
Not open for further replies.

Share This Page