[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /C:/Users/nflores/Desktop/AutoAtencionn/unicard-autoatencion-robots/unicard-autoatencion-robots/seguros-alta/src/main/java/cl/unicard/autoatencion/robots/segurosalta/utils/Wso2Se
rvices.java:[10,40] package com.sun.xml.internal.ws.api.pipe does not exist
[ERROR] /C:/Users/nflores/Desktop/AutoAtencionn/unicard-autoatencion-robots/unicard-autoatencion-robots/seguros-alta/src/main/java/cl/unicard/autoatencion/robots/segurosalta/utils/Wso2Se
rvices.java:[145,9] cannot find symbol
symbol: class ContentType
location: class cl.unicard.autoatencion.robots.segurosalta.utils.Wso2Services
[INFO] 2 errors
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.617 s
[INFO] Finished at: 2020-01-28T22:57:56-03:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project seguros-alta: Compilation failure: Compilation failure:
[ERROR] /C:/Users/nflores/Desktop/AutoAtencionn/unicard-autoatencion-robots/unicard-autoatencion-robots/seguros-alta/src/main/java/cl/unicard/autoatencion/robots/segurosalta/utils/Wso2Se
rvices.java:[10,40] package com.sun.xml.internal.ws.api.pipe does not exist
[ERROR] /C:/Users/nflores/Desktop/AutoAtencionn/unicard-autoatencion-robots/unicard-autoatencion-robots/seguros-alta/src/main/java/cl/unicard/autoatencion/robots/segurosalta/utils/Wso2Se
rvices.java:[145,9] cannot find symbol
[ERROR] symbol: class ContentType
[ERROR] location: class cl.unicard.autoatencion.robots.segurosalta.utils.Wso2Services
[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
我用java开发了一个项目,该项目是我用maven和profile创建的,但是在编译或生成软件包时却出现了此错误。
为什么会出现错误?
答案 0 :(得分:1)
更正确地说,问题出在程序编译上,与pom.xml无关(也许以后要解决此问题,您将需要添加一些外部依赖项,但是当前问题不在于pom.xml)
在编译Wso2Services.java文件时,您有2个错误。第一条错误消息说,编译器未能找到名称为“ com.sun.xml.internal.ws.api.pipe”的包,第二条错误消息说,编译器未找到ContentType类的声明。
您似乎正在尝试导入com.sun.xml.internal.ws.api.pipe.ContentType。但是根据设计,Java不允许导入内部类。参见here