繁体   English   中英

构建时maven pom.xml的问题

[英]Problem with the maven pom.xml at the time of building

[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 和配置文件制作了它,但是在编译或生成包时我遇到了这个错误。

为什么会出现错误?

更正确的说是程序编译的问题,与pom.xml无关(也许以后解决这个问题需要添加一些外部依赖,但目前问题不在pom.xml )

您在编译 Wso2Services.java 文件期间有 2 个错误。 第一条错误消息说,编译器找不到名为“com.sun.xml.internal.ws.api.pipe”的包,第二条说编译器没有找到 ContentType 类的声明。

看起来您正在尝试导入 com.sun.xml.internal.ws.api.pipe.ContentType。 但是按照设计,Java 不允许导入内部类。 这里

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM