jetty启动项目时,BUILD FAILURE,程序包com.sun.org.apache.xml.internal.security.utils不存在

来源:互联网 发布:淘宝货到付款先发货 编辑:程序博客网 时间:2024/06/14 16:43

问题描述:
使用jetty:run启动项目时,build failure,程序包不存在

[INFO] BUILD FAILURE[INFO] ------------------------------------------------------------------------[INFO] Total time: 4.678 s[INFO] Finished at: 2017-09-14T23:34:18+08:00[INFO] Final Memory: 17M/142M[INFO] ------------------------------------------------------------------------[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project crm: Compilation failure: Compilation failure: [ERROR]/E:/EclipseWorkspace/.../src/main/java/com/...utils/UserIDBase64.java:[5,54] 程序包com.sun.org.apache.xml.internal.security.utils不存在[ERROR] /E:/EclipseWorkspace/...理/src/main/java/com/.../utils/UserIDBase64.java:[23,59] 找不到符号[ERROR]   符号:   变量 Base64[ERROR]   位置: 类 com....utils.UserIDBase64[ERROR] /E:/...理/src/main/java/com/.../utils/UserIDBase64.java:[36,46] 找不到符号[ERROR]   符号:   变量 Base64[ERROR]   位置: 类 com.....utils.UserIDBase64[ERROR] /E:/EclipseWorkspace/...理/src/main/java/com/.../utils/UserIDBase64.java:[37,53] 找不到符号[ERROR]   符号:   变量 Base64[ERROR]   位置: 类 com.....utils.UserIDBase64[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

解决方式:添加下面一段内容,指明rt.jar的路径

<plugin>                <groupId>org.apache.maven.plugins</groupId>                <artifactId>maven-compiler-plugin</artifactId>                <configuration>                    <source>1.8</source>                    <target>1.8</target>                    <compilerArguments>                        <bootclasspath>${JAVA_HOME}/jre/lib/rt.jar</bootclasspath>                    </compilerArguments>                </configuration>            </plugin>
阅读全文
0 0
原创粉丝点击