Maven警告以及错误处理

来源:互联网 发布:台州永信网络卢良坚 编辑:程序博客网 时间:2024/05/21 15:48
  • 处理下面的警告需要
[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 72, 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] 

解决办法 :在编译项目插件中指定版本<version></version>

<plugins>          <plugin>              <artifactId>maven-compiler-plugin</artifactId>              <version>2.3.2</version>              <configuration>                  <source>1.6</source>                  <target>1.6</target>                  <encoding>UTF-8</encoding>              </configuration>          </plugin>      </plugins> 

  • 以下警告解决办法
Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!

解决方法:pom文件中添加 <project.build.sourceEncoding> 让整个项目统一字符集编码

<properties>    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding></properties>
0 0