码迷,mamicode.com
首页 > 其他好文 > 详细

maven-compiler-plugin 版本错误解决方法

时间:2014-06-25 20:43:15      阅读:187      评论:0      收藏:0      [点我收藏+]

标签:style   class   blog   code   tar   color   

项目执行Maven build后出现WARNING提示。报如信息如下,根据报错信息猜测是maven-compiler-plugin的版本信息问题

 

[WARNING]  
[WARNING] Some problems were encountered while building the effective model for com.xxx.xxx:xxxx:jar:0.0.1-SNAPSHOT  
[WARNING] ‘build.plugins.plugin.version‘ for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 16, column 12  
[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]

 

 

POM.xml中maven-compiler-plugin插件信息如下

 

<plugins>    
    <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>    
        <configuration>    
            <source>1.6</source>    
            <target>1.6</target>    
        </configuration>    
    </plugin>    
</plugins>

 

修改POM.xml,增加maven-compiler-plugin插件版本信息,如下

<plugins>    
    <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>  
        <version>2.3.2</version>  
        <configuration>    
            <source>1.6</source>    
            <target>1.6</target>    
        </configuration>    
    </plugin>    
</plugins>

Maven clean一下再编译时一切OK了~.~

 

maven-compiler-plugin 版本错误解决方法,布布扣,bubuko.com

maven-compiler-plugin 版本错误解决方法

标签:style   class   blog   code   tar   color   

原文地址:http://www.cnblogs.com/sylvia-liu/p/3805523.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!