Maven build Compilation error : Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project Maven

前端 未结 19 1712
说谎
说谎 2020-12-01 01:17

I have a maven project forked and cloned from a git repo onto my eclipse. It is build on Java 8. The first thing i do is perform a

mvn clean install
         


        
19条回答
  •  半阙折子戏
    2020-12-01 01:47

    This is an irritating error that pops up once in a while , jotting down some steps which help:

    Writing answer from eclipse perspective as base logic will remain the same whether done by Intellij or command line

    1. Rt click your project -> Maven -> Update project -> Select Force update -> Click OK
    2. Under properties tag , add :
    1.8 
    1.8
    
    1. In some instances, you will start seeing error as we tried force update saying , failure to transfer X dependency from Y path , resolutions will not be reattempted , bla bla bla

      In such case quickly fix it by cd to .m2/repository folder and run following command :

    for /r %i in (*.lastUpdated) do del %i
    

提交回复
热议问题