Java version automatically change to java 1.5 after maven update

前端 未结 11 508
盖世英雄少女心
盖世英雄少女心 2020-12-22 17:29

I am using eclipse as IDE. When I right click on the project and then click maven update my java version change to 1.5. Here is what I did so far, I followed all the steps l

11条回答
  •  暖寄归人
    2020-12-22 18:04

    I am using Java 11. This is how the complete pom.xml file looks like after adding and

    
      4.0.0
      com.akshay
      1000SpringSecurityEg
      war
      0.0.1-SNAPSHOT
      1000SpringSecurityEg Maven Webapp
      http://maven.apache.org
        
      
        
          junit
          junit
          3.8.1
          test
        
      
      
        
            11
            ${java.version}
            ${java.version}
        
      
      
        1000SpringSecurityEg
        
            
                
                    org.apache.maven.plugins
                    maven-compiler-plugin
                    3.8.1
                    
                        11
                        11
                    
                
            
            
      
    
    

    The above code worked for me. Hope it works for you as well.

提交回复
热议问题