【Maven】Maven打包失败,程序包com.sun.deploy.net不存在
来源:互联网 发布:coc弓箭女皇升级数据 编辑:程序博客网 时间:2024/06/05 14:54
1.问题
用Maven打包的时候,失败,程序包com.sun.deploy.net不存在;
2.代码
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project fxrj-admin: Compilation failure: Compilation failure:[15,26] 程序包com.sun.deploy.net不存在[93,31] 找不到符号[ERROR] 符号: 变量 URLEncoder[ERROR] -> [Help 1][ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.[ERROR] Re-run Maven using the -X switch to enable full debug logging.[ERROR] For more information about the errors and possible solutions, please read the following articles:[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
3.方案
源文件跟换URLEncoder的jar包,使用URLEncoder(java.net)包;
4.第二个错误
接下来会报程序包com.sun.image.codec.jpeg不存在的错误
<!-- 编译插件 --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>${maven-compiler.version}</version> <configuration> <source>${java.version}</source> <target>${java.version}</target> <encoding>${project.build.sourceEncoding}</encoding> <compilerArguments> <verbose /> <bootclasspath>${java.home}/lib/rt.jar;${java.home}/lib/jce.jar</bootclasspath> </compilerArguments> </configuration> </plugin>
原作者:
maven下面编译失败,失败提示信息为:程序包com.sun.image.codec.jpeg不存在
这个类文件的位置在jre/lib/rt.jar
而我们设置的java_home下面的lib/dt.jar中没有这个文件,导致编译失败。通过配置maven-compiler-plugin插件可以解决此问题。
在windows下面用;分隔,linux下面用:分隔。
配置中使用了两个jar包,因为我在编译的过程中除了报上面那个错误,还报了一个错。所以我添加了两个包。
原帖子在这里:[这里]
阅读全文
0 0
- 【Maven】Maven打包失败,程序包com.sun.deploy.net不存在
- maven下面编译失败,失败提示信息为:程序包com.sun.image.codec.jpeg不存在
- maven 程序包com.sun.image.codec.jpeg不存在的解决方案
- 【javaee】maven:程序包com.sun.image.codec.jpeg不存在
- maven 程序包com.sun.image.codec.jpeg不存在的解决方案
- maven deploy 程序包org.junit不存在
- Maven打包 错误: 程序包org.junit不存在
- maven 程序包com.sun.image.codec.jpeg不存在 问题的完美解决
- maven管理项目时,启动项目报:程序包com.sun.image.codec.jpeg不存在
- maven报错:程序包com.sun.xml.internal.fastinfoset.tools不存在
- 解决maven编译错误:程序包com.sun.xml.internal.ws.spi不存在
- maven项目编译时报‘程序包com.sun.image.codec.jpeg不存在’错误
- maven 程序包com.sun.image.codec.jpeg不存在 问题的完美解决
- maven install 程序包不存在
- maven项目编译:程序包com.sun.image.codec.jpeg不存在 这个类文件的位置在jre/lib/rt.jar
- Maven打包时:com.sun.image.codec.jpeg不存在的解决方案
- maven打包报程序包javax.servlet.jsp.tagext不存在
- maven 程序包org.junit不存在
- 生成字母验证码图片
- jQuery简易左侧固定菜单
- 【洛谷1291】百事世界杯之旅
- Jenkins构建时’Users/Mac/Library/Android/sdk’ does not exist问题
- git常用命令
- 【Maven】Maven打包失败,程序包com.sun.deploy.net不存在
- Linux常用命令查看硬盘资源(free、top)
- PAT(Basic Level)_1047_编程团体赛
- Centos Nginx脚本一键安装
- CSDN访客统计(不用量子恒道)
- 回顾2016|中国房市需要房地产BI解决方案
- js/jquery事件处理
- 实体类的属性的数据类型问题(model的数据类型尽量不要设为int)
- AChartEngine折线图代码测试