简体   繁体   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

I developed a project in java, which I made with maven and profiles but at the time of compiling or generating the package I got this error.我在 java 中开发了一个项目,我用 maven 和配置文件制作了它,但是在编译或生成包时我遇到了这个错误。

Why is the error due?为什么会出现错误?

It is more correct to say that the problem is with program compilation, there is nothing to do with pom.xml (maybe later to solve this problem you will need to add some external dependencies, but currently the problem is not with the pom.xml)更正确的说是程序编译的问题,与pom.xml无关(也许以后解决这个问题需要添加一些外部依赖,但目前问题不在pom.xml )

You have 2 errors during compilation of your Wso2Services.java file.您在编译 Wso2Services.java 文件期间有 2 个错误。 The first error message says, that compiler failed to find package with name "com.sun.xml.internal.ws.api.pipe", and the second one says that compiler does not find a declaration of the ContentType class.第一条错误消息说,编译器找不到名为“com.sun.xml.internal.ws.api.pipe”的包,第二条说编译器没有找到 ContentType 类的声明。

It looks like you are trying to import com.sun.xml.internal.ws.api.pipe.ContentType.看起来您正在尝试导入 com.sun.xml.internal.ws.api.pipe.ContentType。 But by design Java does not allow to import internal classes.但是按照设计,Java 不允许导入内部类。 See here这里

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

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