maven-compiler-plugin 插件版本信息错误提示解决办法

1.maven-compiler-plugin插件版本信息警告提示

[WARNING] 
[WARNING] Some problems were encountered while building the effective model for com.mimhope.jettycode:JettyCode:war:0.0.1-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 14, column 13
[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] 

通过'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing.这句话可以了解到没有设置版本信息;

有问题的设置


	maven-compiler-plugin
	
	  1.5
	  1.5
	  UTF-8
	  false
	

添加一句话-设置maven-compiler-plugin版本

2.3.2

修改以后结果如下


	        maven-compiler-plugin
	        2.3.2
	        
	          1.5
	          1.5
	          UTF-8
	          false
	        

重新运行程序就不会有这个警告了;

 

对照官网用法:http://maven.apache.org/plugins/maven-compiler-plugin/usage.html


  ...
  
    
      
        
          org.apache.maven.plugins
          maven-compiler-plugin
          3.7.0
          
            
          
        
      
    
  
  ...

参考:https://blog.csdn.net/jackgaogaogao/article/details/51533663

你可能感兴趣的:(Maven学习)