關於maven打包 「程序包com.sun.deploy.net不存在」 的問題

關於maven打包 「程序包com.sun.deploy.net不存在」 的問題html

遇到問題以下:java

[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 便可web

解決方案參考:https://wanwang.aliyun.com/info/1571688.htmlapache

相關文章
相關標籤/搜索