gpt4 book ai didi

java - 在 jitpack.io 中找不到 Artifact ,pom 中的几乎所有依赖项都已损坏

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

我似乎无法解决 POM 中的依赖关系。今天早上早些时候,这个项目正在为我工​​作,目前正在另一台机器上工作,但不知何故,现在我的项目是如此无聊,以至于我的所有依赖项都被破坏了,我所有的导入和大多数类都只是红色下划线。我想回到不再有 dependency/pom/maven 错误的地方,并且可以搜索原始的desiredCapability 错误。

环境:苹果系统 Apache Maven 3.6.3我的机器上安装了 Java 8 和 11项目SDK:Java 11集成开发环境:IntelliJAppium 1.16.0

尝试解决原来的问题:
1. mvn 全新安装,带或不带 -U
2.右键单击项目> Maven -> 重新导入
3.尝试在 Eclipse 上打开,但该项目使用 graphql,并且我收到错误,没有我需要的市场选项
4.重启intelliJ
5.重新启动我的电脑
6. Build -> 构建项目,重建项目
7. 删除了我的 .m2 目录并尝试了 mvn clean install/mvn install 等,但这是我所有 Artifact 开始损坏的地方。当我将鼠标悬停时,几乎所有依赖项现在都会显示“未找到依赖项”
8.尝试从pom更新maven索引
9. 删除存储库并重新克隆它
10. 恢复到之前的提交

mvn clean install 的当前错误是: [错误] 无法在项目 mobile-app-automation 上执行目标:无法解析项目 com.automation.cm:mobile-app- 的依赖项自动化:jar:1.0-SNAPSHOT:无法在 org.seleniumhq.selenium:selenium-java:jar:3.141.59 收集依赖项:无法读取 org.seleniumhq.selenium:selenium-java:jar:3.141.59 的 Artifact 描述符:无法将 Artifact org.seleniumhq.selenium:selenium-java:pom:3.141.59 传输到中央( http://jcenter.bintray.com ): http://jcenter.bintray.com/org/seleniumhq/selenium/selenium-java/3.141.59/selenium-java-3.141.59.pom 授权失败403 禁止 -> [帮助1]

mvn编译给出错误:“未能在 https://jitpack.io 中找到 org.seleniumhq.selenium:selenium-java:pom:3.141.59 已缓存在本地存储库中,解析将不会重新尝试,直到 jitpack.io 的更新间隔已过或强制更新”

这是我的 pom,90% 的依赖项是红色的:

<?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.automation.cm</groupId>
<artifactId>mobile-app-automation</artifactId>
<version>1.0-SNAPSHOT</version>
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
<repository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>bintray</name>
<url>http://jcenter.bintray.com</url>
</repository>
</repositories>
<dependencies>

<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>3.141.59</version>
</dependency>

<dependency>
<groupId>io.appium</groupId>
<artifactId>java-client</artifactId>
<version>7.2.0</version>
</dependency>

<dependency>
<groupId>com.github.annaFedorchenko</groupId>
<artifactId>automation-xray-integration-library</artifactId>
<version>1.0</version>
</dependency>


<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>java-hamcrest</artifactId>
<version>2.0.0.0</version>
<scope>test</scope>
</dependency>


<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>java-hamcrest</artifactId>
<version>2.0.0.0</version>
<scope>compile</scope>
</dependency>


<dependency>
<groupId>com.saucelabs</groupId>
<artifactId>saucerest</artifactId>
<version>1.0.40</version>
<scope>test</scope>
</dependency>

<!-- DEPENDENCIES FOR THE API TESTING -->

<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>RELEASE</version>
</dependency>

<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.9.4</version>
</dependency>

<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.9.4</version>
</dependency>

<!-- https://mvnrepository.com/artifact/com.jayway.restassured/rest-assured -->
<dependency>
<groupId>com.jayway.restassured</groupId>
<artifactId>rest-assured</artifactId>
<version>2.9.0</version>
<scope>test</scope>
</dependency>

<!-- https://mvnrepository.com/artifact/org.projectlombok/lombok -->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.10</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>com.jayway.restassured</groupId>
<artifactId>rest-assured</artifactId>
<version>RELEASE</version>
<scope>compile</scope>
</dependency>

<dependency>
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>
<version>1.1.1</version>
</dependency>

<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.2.11</version>
</dependency>
<!-- https://mvnrepository.com/artifact/junit/junit -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>io.qameta.allure</groupId>
<artifactId>allure-junit4</artifactId>
<version>2.12.1</version>
<scope>test</scope>
</dependency>

<!-- https://mvnrepository.com/artifact/com.apollographql.apollo/apollo-android-support -->

<dependency>
<groupId>com.apollographql.apollo</groupId>
<artifactId>apollo-runtime</artifactId>
<version>1.2.3</version>
<scope>system</scope>
<systemPath>${basedir}/libs/apollo-runtime-1.2.3.jar</systemPath>
</dependency>

<dependency>
<groupId>com.apollographql.apollo</groupId>
<artifactId>api</artifactId>
<version>1.2.3</version>
<scope>system</scope>
<systemPath>${basedir}/libs/apollo-api-1.2.3.jar</systemPath>
</dependency>

<!-- Optional, needed only for ANNOTATED nullable type-->
<dependency>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
<version>13.0</version>
<scope>system</scope>
<systemPath>${basedir}/libs/annotations-13.0.jar</systemPath>
</dependency>
<dependency>
<groupId>io.qameta.allure</groupId>
<artifactId>allure-java-commons</artifactId>
<version>2.12.1</version>
<scope>compile</scope>
</dependency>

</dependencies>

<properties>
<aspectj.version>1.8.10</aspectj.version>
</properties>

<build>
<plugins>
<plugin>
<groupId>com.github.sparow199</groupId>
<artifactId>apollo-client-maven-plugin</artifactId>
<version>2.2.3</version>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<!-- <rootPackageName>com.example.graphql.client</rootPackageName>-->
<!-- <skip>false</skip>-->
<!-- <addSourceRoot>true</addSourceRoot>-->
<introspectionFile>
src/main/java/com/automation/api/apiresources/config/schema.json
</introspectionFile>
<!-- <generateTransformedQueries>false</generateTransformedQueries>-->
<!-- transformedQueriesOutputDir>${project.build.directory}/generated-sources/graphql-client/transformedQueries</transformedQueriesOutputDir>-->
<generateIntrospectionFile>true</generateIntrospectionFile>
<schemaUrl>https://qa-kong.command-api.kw.com/graphql/gql</schemaUrl>
<sourceDirName>${project.basedir}/src/main/java/com/automation/api/apiresources/config
</sourceDirName>
<!-- <outputDirectory>${project.build.directory}/generated-sources/graphql-client</outputDirectory>-->
<!-- <generateModelBuilder>true</generateModelBuilder>-->
<!-- <useJavaBeansSemanticNaming>true</useJavaBeansSemanticNaming>-->
<!-- <useSemanticNaming>true</useSemanticNaming>-->
<!-- <nullableValueType>JAVA_OPTIONAL</nullableValueType>-->
<!-- <suppressRawTypesWarning>false</suppressRawTypesWarning>-->
<!-- <generateKotlinModels>false</generateKotlinModels>-->
<!-- <generateAsInternal>false</generateAsInternal>-->
<!-- <generateVisitorForPolymorphicDatatypes>false</generateVisitorForPolymorphicDatatypes>-->
</configuration>

</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.1</version>
<configuration>
<testFailureIgnore>false</testFailureIgnore>
<argLine>
-javaagent:"${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar"
</argLine>
<properties>
<property>
<name>listener</name>
<value>io.qameta.allure.junit4.AllureJunit4</value>
</property>
</properties>
<systemProperties>
<property>
<name>allure.results.directory</name>
<value>${project.build.directory}/allure-results</value>
</property>
</systemProperties>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
<dependencies>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
<version>${aspectj.version}</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>io.qameta.allure</groupId>
<artifactId>allure-maven</artifactId>
<version>2.10.0</version>
<configuration>
<reportVersion>2.4.1</reportVersion>
</configuration>
</plugin>
</plugins>
</build>

最佳答案

根据 JFrog,as of Jan 2020 ,JCenter 只能通过 https 访问。您的存储库快照包含 http 而不是 https。

<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
<repository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>bintray</name>
<url>https://jcenter.bintray.com</url>
</repository>
</repositories>

关于java - 在 jitpack.io 中找不到 Artifact ,pom 中的几乎所有依赖项都已损坏,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60011325/

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