java - 我在下载 Wildfly 依赖项时遇到问题
问题描述
大家早上好,我在为 wildfly 下载 quickstart/hello-world 的依赖项时遇到问题。
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.wildfly.quickstarts</groupId>
<artifactId>quickstart-parent</artifactId>
<!--
Maintain separation between the artifact id and the version to help prevent
merge conflicts between commits changing the GA and those changing the V.
-->
<version>19.0.0.Beta1-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>helloworld</artifactId>
<packaging>war</packaging>
<name>Quickstart: helloworld</name>
<description>Helloworld</description>
<licenses>
<license>
<name>Apache License, Version 2.0</name>
<distribution>repo</distribution>
<url>http://www.apache.org/licenses/LICENSE-2.0.html</url>
</license>
</licenses>
<dependencies>
<!-- Import the CDI API, we use provided scope as the API is included in WildFly -->
<dependency>
<groupId>jakarta.enterprise</groupId>
<artifactId>jakarta.enterprise.cdi-api</artifactId>
<scope>provided</scope>
</dependency>
<!-- Import the Common Annotations API (JSR-250), we use provided scope
as the API is included in WildFly -->
<dependency>
<groupId>org.jboss.spec.javax.annotation</groupId>
<artifactId>jboss-annotations-api_1.3_spec</artifactId>
<scope>provided</scope>
</dependency>
<!-- Import the Servlet API, we use provided scope as the API is included in WildFly -->
<dependency>
<groupId>org.jboss.spec.javax.servlet</groupId>
<artifactId>jboss-servlet-api_4.0_spec</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>
构建eclipse列表错误后:
[错误] 不可解析的导入 POM:无法将工件 org.wildfly.bom:wildfly-jakartaee8-with-tools:pom:19.0.0.Beta1-SNAPSHOT 从/到 centralnexus ( https://fabricaportal.accenture.com /nexus/repository/OI_Central/):拒绝访问 https://fabricaportal.accenture.com/nexus/repository/OI_Central/org/wildfly/bom/wildfly-jakartaee8- with-tools/19.0.0.Beta1-SNAPSHOT/wildfly-jakartaee8-with-tools-19.0.0.Beta1-SNAPSHOT.pom。错误代码 401,未经授权 @ org.wildfly.quickstarts:quickstart-parent:19.0.0.Beta1-SNAPSHOT,C:\Users\victor.hugo.b.silva\Desktop\quickstart\pom.xml,第 101 行,第 25 列[错误] jakarta.enterprise:jakarta.enterprise.cdi-api:jar 的“dependencies.dependency.version”缺失。@ 第 47 行,第 21 列 [错误] org.jboss.spec.javax.annotation:jboss-annotations-api_1.3_spec:jar 的“dependencies.dependency.version”缺失。@ 第 55 行,第 21 列 [错误] org.jboss.spec.javax.servlet:jboss-servlet-api_4.0_spec:jar 的“dependencies.dependency.version”缺失。@ 第 62 行,第 21 列
但是在项目中,没有声明任何依赖的版本
解决方案
这个错误实际上是因为我使用的版本而发生的,我还没有依赖项,所以我将其更改为 18.0.0
推荐阅读
- solidworks - Looing for api.chm for solidworks 2018
- node.js - 带有 NodeJS、Json 错误的 Google Sheets API
- laravel - 如何通过 laravel Eloquent 多对多搜索
- networking - 如何创建虚拟网络接口并将其连接到网桥
- java - Java 8 Stream of LocalDateTime,如何在不循环所有内容的情况下找到它们的列表
- android - 停止活动自动置于前面
- java - Spring @transactional 是否与 MongoDB 一起使用?
- java - 无法将 java.lang.String 类型的值转换为日期(在字段“time_stamp”中找到)
- callback - ESP8266,客户端通过 Ticker 连接
- unity3d - unity:如何在地形上粘贴 arial 照片?