Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile)

前端 未结 23 2413
小蘑菇
小蘑菇 2020-11-29 15:55

I am using Maven 3.0.5 and Spring Tool Source 3.2 with Maven plugin installed. When I try to do \'Run As---> Maven install\', I am getting

23条回答
  •  情话喂你
    2020-11-29 16:27

    I am adding more points to the solution by @Rushi Shah

    mvn clean install -X helps to identify the root cause.

    Some of the important phases of Maven build lifecycle are:

    clean – the project is clean of all artifacts that came from previous compilations compile – the project is compiled into /target directory of project root install – packaged archive is copied into local maven repository (could in your user's home directory under /.m2) test – unit tests are run package – compiled sources are packaged into archive (JAR by default)

    The 1.6 under tag refers to JDK version. We need to ensure that proper jdk version in our dev environment or change the value to 1.7 or 1.5 or whatever if the application can be supported in that JDK version.

    
        
            
                org.apache.maven.plugins
                maven-compiler-plugin
                3.0
                
                    1.6
                    1.6
                
            
        
    
    

    We can find the complete details on Maven build lifecycle in Maven site.

提交回复
热议问题