gpt4 book ai didi

java - 无法为com.sun.xml.bind:jaxb-core:jar:2.2.11构建父项目

转载 作者:太空宇宙 更新时间:2023-11-04 09:33:42 30 4
gpt4 key购买 nike

我正在研究从Oracle JDK 8到OpenJDK 12的JDK迁移。我已经解决了构建时的所有问题。但是我在构建过程中收到以下警告,


无法为com.sun.xml.bind:jaxb-core:jar:2.2.11构建父项目。2. com.sun.xml.bind:jaxb-core:jar:2.2.11传递依赖项无效的POM(如果有) )将不可用
无法为com.sun.xml.bind:jaxb-impl:jar:2.2.11建立父项目
com.sun.xml.bind:jaxb-impl:jar:2.2.11的POM无效,传递依赖项(如果有)将不可用。


事件虽然我已经将JAXB jars更新为2.3.0,但我想知道它如何显示与2.211相关的版本。请分享您的想法。

我已经将JAXB jars升级到了最新版本。但是解决该问题没有帮助。

请参考下面给出的POM,

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>com.migration.app</groupId>
<artifactId>StudentManagement</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>



<repositories>

<repository>
<id>jaxb-api-libs</id>
<url>http://repo.maven.apache.org/maven2/</url>
</repository>


<repository>
<id>liteda-jco-libs</id>
<url>http://nexus.liteda.lt/content/groups/public/</url>
</repository>
<!-- repository> <id>vaadin-addons</id>
<url>http://maven.vaadin.com/vaadin-addons</url>
</repository -->
<repository>
<id>jenkins</id>
<name>Jenkins Repository</name>
<url>http://repo.jenkins-ci.org/releases</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>

<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.4.5.RELEASE</version>
<relativePath /> <!-- lookup parent from repository -->
</parent>

<properties>
<sap.jco.version>3.0.15</sap.jco.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-
8</project.reporting.outputEncoding>
<!-- <maven.compiler.source>12</maven.compiler.source>
<maven.compiler.target>12</maven.compiler.target> -->
<java.version>12</java.version>
<lib.directory>${project.build.directory}/lib</lib.directory>
<native.lib.directory>${lib.directory}/${envClassifier}
</native.lib.directory>
<maven.compiler.source>12</maven.compiler.source>
<maven.compiler.target>12</maven.compiler.target>
</properties>

<dependencyManagement>
<dependencies>
<!-- /////////////////////////////////////////////// -->
<!-- Vaadin -->
<!-- /////////////////////////////////////////////// -->
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-bom</artifactId>
<version>7.7.3</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

<dependencies>
<!-- /////////////////////////////////////////////// -->
<!-- SAP J/CO API -->
<!-- /////////////////////////////////////////////// -->
<dependency>
<groupId>org.hibersap</groupId>
<artifactId>sapjco3</artifactId>
<version>${sap.jco.version}</version>
</dependency>
<!-- /////////////////////////////////////////////// -->
<!-- Java Mail -->
<!-- /////////////////////////////////////////////// -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-mail</artifactId>
<version>1.5.3.RELEASE</version>
</dependency>


<!-- /////////////////////////////////////////////// -->
<!-- Vaadin -->
<!-- /////////////////////////////////////////////// -->
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-spring-boot-starter</artifactId>
<version>1.1.0</version>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-spring</artifactId>
<version>1.1.0</version>
</dependency>


<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-themes</artifactId>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>19.0-rc2</version>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-treegrid</artifactId>
<version>0.7.3</version>
</dependency>
<dependency>
<groupId>org.vaadin.spring.extensions</groupId>
<artifactId>vaadin-spring-ext-core</artifactId>
<version>0.0.7.RELEASE</version>
</dependency>
<dependency>
<groupId>org.vaadin.spring.extensions</groupId>
<artifactId>vaadin-spring-ext-boot</artifactId>
<version>0.0.7.RELEASE</version>
</dependency>
<dependency>
<groupId>org.vaadin.spring.extensions</groupId>
<artifactId>vaadin-spring-ext-security</artifactId>
<version>0.0.7.RELEASE</version>
</dependency>
<dependency>
<groupId>org.vaadin.spring.addons</groupId>
<artifactId>vaadin-spring-addon-eventbus</artifactId>
<version>0.0.7.RELEASE</version>
</dependency>

<!-- /////////////////////////////////////////////// -->
<!-- Spring + Camel -->
<!-- /////////////////////////////////////////////// -->
<!-- <dependency> <groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-config-server</artifactId>
<version>1.1.3.RELEASE</version> </dependency> -->
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-spring-boot-starter</artifactId>
<version>2.18.0</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-rest</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-hateoas</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>

<!-- /////////////////////////////////////////////// -->
<!-- Utils -->
<!-- /////////////////////////////////////////////// -->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.8</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.5</version>
</dependency>
<dependency>
<groupId>org.vaadin</groupId>
<artifactId>viritin</artifactId>
<version>1.61</version>
</dependency>
<dependency>
<groupId>com.google.zxing</groupId>
<artifactId>core</artifactId>
<version>3.3.0</version>
</dependency>
<dependency>
<groupId>net.sourceforge.htmlunit</groupId>
<artifactId>htmlunit</artifactId>
</dependency>
<!-- /////////////////////////////////////////////// -->
<!-- Database drivers -->
<!-- /////////////////////////////////////////////// -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
<!-- /////////////////////////////////////////////// -->
<!-- Windows Service -->
<!-- /////////////////////////////////////////////// -->
<dependency>
<groupId>commons-daemon</groupId>
<artifactId>commons-daemon</artifactId>
<version>1.0.15</version>
</dependency>
<dependency>
<groupId>com.sun.winsw</groupId>
<artifactId>winsw</artifactId>
<version>1.18</version>
<classifier>bin</classifier>
<type>exe</type>
<scope>provided</scope>
</dependency>
<!-- /////////////////////////////////////////////// -->
<!-- Test -->
<!-- /////////////////////////////////////////////// -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.restdocs</groupId>
<artifactId>spring-restdocs-mockmvc</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-exec</artifactId>
<version>1.3</version>
</dependency>

<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
</dependency>

<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context-support</artifactId>
</dependency>
<dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
<version>1.4.3</version>
</dependency>
<dependency>
<groupId>org.freemarker</groupId>
<artifactId>freemarker</artifactId>
<version>2.3.23</version>
</dependency>
<dependency>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.0.1</version>
<type>maven-plugin</type>
</dependency>

<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.3.0</version>
</dependency>

<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<version>2.3.0</version>
</dependency>

<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-core</artifactId>
<version>2.3.0</version>
</dependency>

<dependency>
<groupId>javax.activation</groupId>
<artifactId>javax.activation-api</artifactId>
<version>1.2.0</version>
</dependency>

</dependencies>

<build>
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
<resource>
<directory>src/main/webapp</directory>
</resource>
</resources>
<plugins>
<plugin>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-maven-plugin</artifactId>
<version>8.4.5</version>
<executions>
<execution>
<goals>
<goal>update-theme</goal>
<goal>compile-theme</goal>
<!-- <goal>clean</goal> <goal>resources</goal>
<goal>update-widgetset</goal>
<goal>compile</goal> -->
</goals>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>copy-resources</id>
<phase>process-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${dist.dir}</outputDirectory>
<resources>
<resource>
<directory>src/main/dist</directory>
<filtering>true</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptors>
<descriptor>src/main/assembly/unix.xml</descriptor>
<descriptor>src/main/assembly/windows.xml</descriptor>
</descriptors>
</configuration>
<executions>
<execution>
<id>assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>

</plugins>
</build>


</project>

最佳答案

我试图将JAXB RI作为JPMS模块添加到我的应用程序中。尽管由于以下两个工件之间的软件包拆分,但此操作失败:

<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<version>2.3.0</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-core</artifactId>
<version>2.3.0</version>
</dependency>


如果这些不是要使用的正确工件,那么我应该使用哪些工件呢?所以我可能只是使用了错误的工件。注意我也尝试过

<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
<version>2.3.0</version>




但这反过来又牵扯到了核心,再次导致了拆分程序包问题。
https://javaee.github.io/jaxb-v2/doc/user-guide/ch03.html#deployment上的用户指南也未提供有关如何将JAXB RI用作JPMS模块的说明。

关于java - 无法为com.sun.xml.bind:jaxb-core:jar:2.2.11构建父项目,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56770681/

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