在 jitpack.io 中找不到工件,pom 中的几乎所有依赖项都已损坏
Could not find artifact in jitpack.io, almost all dependencies in pom broken
我似乎无法解析我的 POM 中的依赖项。这个项目今天早上早些时候为我工作,目前正在另一台机器上工作,但不知何故,现在我的项目太无聊了,以至于我所有的依赖关系都被破坏了,我所有的导入和我的大部分 类 都只是红色下划线。我想回到不再有 dependency/pom/maven 错误的地方,可以搜索原始的 desiredCapabilities 错误。
环境:
苹果系统
阿帕奇行家 3.6.3
Java 我的机器上安装了 8 和 11
项目 SDK:Java11
IDE:IntelliJ
Appium 1.16.0
正在尝试解决原问题:
1. Mvn clean install,带和不带-U
2. 右击项目> Maven -> reimport
3. 试图在 eclipse 上打开,但这个项目使用 graphql,我得到错误,没有我需要的市场选项
4. 重启intelliJ
5. 重新启动我的电脑
6. Build -> Build project, 重建项目
7. 删除我的 .m2 目录并尝试 mvn clean install/mvn install 等,但这是我所有工件开始损坏的地方。当我将鼠标悬停在
时,几乎所有依赖项现在都显示 "Dependency not found"
8. 尝试从 pom
更新 Maven 索引
9. 删除 repo 并重新克隆它
10. 恢复到之前的提交
mvn clean install 的当前错误是: [错误] 无法执行项目移动应用程序自动化的目标:无法解析项目的依赖项 com.automation.cm :移动应用程序自动化:jar:1.0-SNAPSHOT:无法在 org.seleniumhq.selenium 收集依赖项:selenium-java:jar:3.141.59:无法读取 org.seleniumhq.selenium 的工件描述符: selenium-java:jar:3.141.59: 无法传输工件 org.seleniumhq.selenium:selenium-java:pom:3.141.59 from/to central (http://jcenter.bintray.com): Authorization failed for http://jcenter.bintray.com/org/seleniumhq/selenium/selenium-java/3.141.59/selenium-java-3.141.59.pom 403禁止 -> [帮助 1]
mvn compile 给出错误:“无法在 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>
我似乎无法解析我的 POM 中的依赖项。这个项目今天早上早些时候为我工作,目前正在另一台机器上工作,但不知何故,现在我的项目太无聊了,以至于我所有的依赖关系都被破坏了,我所有的导入和我的大部分 类 都只是红色下划线。我想回到不再有 dependency/pom/maven 错误的地方,可以搜索原始的 desiredCapabilities 错误。
环境: 苹果系统 阿帕奇行家 3.6.3 Java 我的机器上安装了 8 和 11 项目 SDK:Java11 IDE:IntelliJ Appium 1.16.0
正在尝试解决原问题:
1. Mvn clean install,带和不带-U
2. 右击项目> Maven -> reimport
3. 试图在 eclipse 上打开,但这个项目使用 graphql,我得到错误,没有我需要的市场选项
4. 重启intelliJ
5. 重新启动我的电脑
6. Build -> Build project, 重建项目
7. 删除我的 .m2 目录并尝试 mvn clean install/mvn install 等,但这是我所有工件开始损坏的地方。当我将鼠标悬停在
时,几乎所有依赖项现在都显示 "Dependency not found"
8. 尝试从 pom
更新 Maven 索引
9. 删除 repo 并重新克隆它
10. 恢复到之前的提交
mvn clean install 的当前错误是: [错误] 无法执行项目移动应用程序自动化的目标:无法解析项目的依赖项 com.automation.cm :移动应用程序自动化:jar:1.0-SNAPSHOT:无法在 org.seleniumhq.selenium 收集依赖项:selenium-java:jar:3.141.59:无法读取 org.seleniumhq.selenium 的工件描述符: selenium-java:jar:3.141.59: 无法传输工件 org.seleniumhq.selenium:selenium-java:pom:3.141.59 from/to central (http://jcenter.bintray.com): Authorization failed for http://jcenter.bintray.com/org/seleniumhq/selenium/selenium-java/3.141.59/selenium-java-3.141.59.pom 403禁止 -> [帮助 1]
mvn compile 给出错误:“无法在 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>