Solved Unable to compile my Maven Project

Discussion in 'Plugin Development' started by Deleted user, Apr 22, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    Deleted user

    I created a new Maven Project for my plugin.
    1. Run As >> Maven install - It works.
    2. Run As >> Maven clean - Recommended in the official plugin tutorial.
    3. Run As >> Maven install - Doesn't work.
    Here is Eclipse console.
    Code:
    SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
    SLF4J: Defaulting to no-operation (NOP) logger implementation
    SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
    [INFO] Scanning for projects...
    [WARNING]
    [WARNING] Some problems were encountered while building the effective model for com.gmail.francescomenzani99:KillConfirmed:jar:0.0.1-SNAPSHOT
    [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 8, column 21
    [WARNING]
    [WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
    [WARNING]
    [WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
    [WARNING]
    [INFO]                                                                   
    [INFO] ------------------------------------------------------------------------
    [INFO] Building KillConfirmed 0.0.1-SNAPSHOT
    [INFO] ------------------------------------------------------------------------
    [INFO]
    [INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ KillConfirmed ---
    [debug] execute contextualize
    [WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
    [INFO] Copying 1 resource
    [INFO]
    [INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ KillConfirmed ---
    [WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent!
    [INFO] Compiling 1 source file to D:\Francesco\Programmazione\Java\KillConfirmed\target\classes
    [INFO] -------------------------------------------------------------
    [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: 8.315s
    [INFO] Finished at: Tue Apr 22 14:01:14 CEST 2014
    [INFO] Final Memory: 7M/111M
    [INFO] ------------------------------------------------------------------------
    [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project KillConfirmed: 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
    
     
  2. Offline

    Garris0n

  3. Offline

    Deleted user

    Thank you Garris0n.
    I prefer a simple JavaProject. It works, too.
     
  4. Offline

    Garris0n

    I thought Maven looked damn complicated until I bothered to read the documentation. It's actually pretty simple and very useful for being lazy. If you're open-sourcing your plugin, it's best to use because it makes it very easy for others to build.
     
    MusicalCreeper01 and breezeyboy like this.
Thread Status:
Not open for further replies.

Share This Page