解决maven打包 错误: 程序包com.sun.istack.internal不存在 - BBSMAX
**
解决maven打包 错误: 程序包com.sun.istack.internal不存在 - BBSMAX
**使用com.sun.istack.internal.Nullable包时能正常引用,但是使用maven项目打包jar时报错。
在使用maven打包时报错信息如下
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /F:/rbcx/rbjc/src/main/java/cn/edu/zut/pro/rbjc/config/intercepors/LoginInterceptor.java:[5,31] 程序包com.sun.istack.internal不存在
[ERROR] /F:/rbcx/rbjc/src/main/java/cn/edu/zut/pro/rbjc/config/intercepors/LoginInterceptor.java:[53,103] 找不到符号
符号: 类 Nullable
位置: 类 cn.edu.zut.pro.rbjc.config.intercepors.LoginInterceptor
[ERROR] /F:/rbcx/rbjc/src/main/java/cn/edu/zut/pro/rbjc/config/intercepors/LoginInterceptor.java:[56,108] 找不到符号
符号: 类 Nullable
位置: 类 cn.edu.zut.pro.rbjc.config.intercepors.LoginInterceptor
[INFO] 3 errors
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6.263 s
[INFO] Finished at: 2019-05-16T15:07:59+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project rbjc: Compilation failure: Compilation failure:
[ERROR] /F:/rbcx/rbjc/src/main/java/cn/edu/zut/pro/rbjc/config/intercepors/LoginInterceptor.java:[5,31] 程序包com.sun.istack.internal不存在
[ERROR] /F:/rbcx/rbjc/src/main/java/cn/edu/zut/pro/rbjc/config/intercepors/LoginInterceptor.java:[53,103] 找不到符号
[ERROR] 符号: 类 Nullable
[ERROR] 位置: 类 cn.edu.zut.pro.rbjc.config.intercepors.LoginInterceptor
[ERROR] /F:/rbcx/rbjc/src/main/java/cn/edu/zut/pro/rbjc/config/intercepors/LoginInterceptor.java:[56,108] 找不到符号
[ERROR] 符号: 类 Nullable
[ERROR] 位置: 类 cn.edu.zut.pro.rbjc.config.intercepors.LoginInterceptor
[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
添加一下依赖重新打包
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<version>2.2.11</version>
</dependency>
<dependency>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
<version>13.0</version>
</dependency>
上一篇: PyInstaller库介绍
下一篇: 机器学习(四):决策树