gpt4 book ai didi

java - 构建时maven pom.xml出现问题

转载 作者:行者123 更新时间:2023-12-02 09:04:11 25 4
gpt4 key购买 nike

[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 不允许导入内部类。请参阅here

关于java - 构建时maven pom.xml出现问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59959626/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com