本文主要是介绍Maven警告以及错误处理,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
- 处理下面的警告需要
[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>
这篇关于Maven警告以及错误处理的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!