Heim  >  Artikel  >  Datenbank  >  maven2 编译 JPEGImageEncoder

maven2 编译 JPEGImageEncoder

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

项目中用到了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以前的是有问题的;




Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn