Home  >  Article  >  Database  >  maven2 编译 JPEGImageEncoder

maven2 编译 JPEGImageEncoder

WBOY
WBOYOriginal
2016-06-07 15:24:421437browse

项目中用到了maven来管理,因为有些功能用到了sun的专用API(比如JPEGImageEncoder这个类),在maven编译过程中会报“ 是 Sun 的专用 API,可能会在未来版本中删除 ”这样的错误导致最终编译失败,google了一番可以使用最新版本的编译插件解决这个问题,在项

项目中用到了maven来管理,因为有些功能用到了sun的专用API(比如JPEGImageEncoder这个类),在maven编译过程中会报“ 是 Sun 的专用 API,可能会在未来版本中删除 ”这样的错误导致最终编译失败,google了一番可以使用最新版本的编译插件解决这个问题,在项目的pom文件中配置如下:

1、其中maven-compiler-plugin用2.3.1版,我之前用的是2.0.2的;

2、必须指定plexus-compiler-javac这个依赖,并且最新版本1.8.1才解决了这个问题,1.8.1以前的是有问题的;




Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn