关于maven打包 “程序包com.sun.deploy.net不存在” 的问题

原创
2018/11/01 15:17
阅读数 9.9K

关于maven打包 “程序包com.sun.deploy.net不存在” 的问题

遇到问题如下:

[INFO] payGateway 1.0-SNAPSHOT ............................ SUCCESS [  0.025 s]
[INFO] payGateway-web 1.0.0 ............................... FAILURE [  9.373 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 14.064 s
[INFO] Finished at: 2018-11-01T14:48:48+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project payGateway-web: Compilation failure: Compilation failure: 
[ERROR] /D:/third/pay/payGateway/payGateway-web/src/main/java/com/yuantu/unified/pay/manager/impl/smilePayPlan/SmileInitialize.java:[10,26] 程序包com.sun.deploy.net不存在
[ERROR] /D:/third/pay/payGateway/payGateway-web/src/main/java/com/yuantu/unified/pay/provider/alipay/AliPayApiUtil.java:[13,26] 程序包com.sun.deploy.net不存在
[ERROR] /D:/third/pay/payGateway/payGateway-web/src/main/java/com/yuantu/unified/pay/manager/impl/smilePayPlan/SmileInitialize.java:[10,26] 程序包com.sun.deploy.net不存在
[ERROR] /D:/third/pay/payGateway/payGateway-web/src/main/java/com/yuantu/unified/pay/provider/alipay/AliPayApiUtil.java:[13,26] 程序包com.sun.deploy.net不存在
[ERROR] /D:/third/pay/payGateway/payGateway-web/src/main/java/com/yuantu/unified/pay/manager/impl/smilePayPlan/SmileInitialize.java:[119,30] 找不到符号
[ERROR]   符号:   变量 URLEncoder
[ERROR]   位置: 类 com.yuantu.unified.pay.manager.impl.smilePayPlan.SmileInitialize
[ERROR] /D:/third/pay/payGateway/payGateway-web/src/main/java/com/yuantu/unified/pay/manager/impl/smilePayPlan/SmileInitialize.java:[120,39] 找不到符号
[ERROR]   符号:   变量 URLEncoder
[ERROR]   位置: 类 com.yuantu.unified.pay.manager.impl.smilePayPlan.SmileInitialize
[ERROR] /D:/third/pay/payGateway/payGateway-web/src/main/java/com/yuantu/unified/pay/manager/impl/smilePayPlan/SmileInitialize.java:[121,36] 找不到符号
[ERROR]   符号:   变量 URLEncoder
[ERROR]   位置: 类 com.yuantu.unified.pay.manager.impl.smilePayPlan.SmileInitialize
[ERROR] /D:/third/pay/payGateway/payGateway-web/src/main/java/com/yuantu/unified/pay/manager/impl/smilePayPlan/SmileInitialize.java:[122,36] 找不到符号
[ERROR]   符号:   变量 URLEncoder
[ERROR]   位置: 类 com.yuantu.unified.pay.manager.impl.smilePayPlan.SmileInitialize
[ERROR] /D:/third/pay/payGateway/payGateway-web/src/main/java/com/yuantu/unified/pay/manager/impl/smilePayPlan/SmileInitialize.java:[123,35] 找不到符号
[ERROR]   符号:   变量 URLEncoder
[ERROR]   位置: 类 com.yuantu.unified.pay.manager.impl.smilePayPlan.SmileInitialize
[ERROR] /D:/third/pay/payGateway/payGateway-web/src/main/java/com/yuantu/unified/pay/manager/impl/smilePayPlan/SmileInitialize.java:[124,42] 找不到符号
[ERROR]   符号:   变量 URLEncoder
[ERROR]   位置: 类 com.yuantu.unified.pay.manager.impl.smilePayPlan.SmileInitialize
[ERROR] /D:/third/pay/payGateway/payGateway-web/src/main/java/com/yuantu/unified/pay/provider/alipay/AliPayApiUtil.java:[769,36] 找不到符号
[ERROR]   符号:   变量 URLEncoder
[ERROR]   位置: 类 com.yuantu.unified.pay.provider.alipay.AliPayApiUtil
[ERROR] -> [Help 1]
[ERROR] 
[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] 
[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
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :payGateway-web

com.sun.deploy.net.URLEncoder 换成 java.net.URLEncoder 即可

解决方案参考:https://wanwang.aliyun.com/info/1571688.html

展开阅读全文
打赏
0
0 收藏
分享
加载中
更多评论
打赏
0 评论
0 收藏
0
分享
返回顶部
顶部