maven - 收到错误消息“无法在项目上执行目标 org.apache.maven.plugins:maven-install-plugin:2.5.2:install (default-install)”
问题描述
Waiting for Jenkins to finish collecting data
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-install-plugin:2.5.2:install (default-install) on project iGateVacationServices: Execution default-install of goal org.apache.maven.plugins:maven-install-plugin:2.5.2:install failed: Plugin org.apache.maven.plugins:maven-install-plugin:2.5.2 or one of its dependencies could not be resolved: Failed to collect dependencies at org.apache.maven.plugins:maven-install-plugin:jar:2.5.2 -> org.apache.maven:maven-project:jar:2.2.1 -> org.apache.maven:maven-settings:jar:2.2.1 -> org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1 -> junit:junit:jar:3.8.1: Failed to read artifact descriptor for junit:junit:jar:3.8.1: Could not transfer artifact junit:junit:pom:3.8.1 from/to central (https://repo.maven.apache.org/maven2): Connect to repo.maven.apache.org:443 [repo.maven.apache.org/151.101.112.215] failed: Connection timed out: connect -> [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:
[JENKINS] Archiving D:\Selenium\iGATEVacationService\iGateVacationServices\pom.xml to iGateVacationServices/iGateVacationServices/0.0.1-SNAPSHOT/iGateVacationServices-0.0.1-SNAPSHOT.pom
我的测试执行正常,但是在打印报告时,它在 Jenkins 中显示以下错误。需要帮助以了解我在添加依赖项或插件时是否犯了任何错误。
我正在使用 JDK1.8、TestNG、Selenium、Maven 和 Jenkins。
我的 POM.XML 依赖项和插件如下
<dependencies>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>3.141.59</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.14.3</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>4.0.0</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>4.0.0</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-scratchpad</artifactId>
<version>4.0.0</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>ooxml-schemas</artifactId>
<version>1.4</version>
</dependency>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-testng</artifactId>
<version>3.0.0-M1</version>
</dependency>
<dependency>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<version>3.0.0-M1</version>
<type>maven-plugin</type>
</dependency>
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc6</artifactId>
<version>11.2.0.3</version>
<scope>system</scope>
<systemPath>${basedir}/ojdbc6.jar</systemPath>
</dependency>
<dependency>
<groupId>com.relevantcodes</groupId>
<artifactId>extentreports</artifactId>
<version>2.41.2</version>
</dependency>
</dependencies>
<build>
<pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
<plugins>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>3.0.0</version>
</plugin>
<!-- see http://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_jar_packaging -->
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>3.0.2</version>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>3.0.2</version>
</plugin>
<plugin>
<artifactId>maven-install-plugin</artifactId>
<version>2.5.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<verbose>true</verbose>
</configuration>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.20.1</version>
<inherited>true</inherited>
<configuration>
<suitXmlFiles>${suiteFile}</suitXmlFiles>
</configuration>
</plugin>
</plugins>
解决方案
推荐阅读
- python - 如何使用正则表达式在python中用字符替换特定整数?
- docusignapi - DocuSign API 复合模板服务器模板理解
- r - 将子目录中的多个 Excel 工作簿读取到一个数据框中
- html - 在 Django 表单中显示红色星号 (*)
- sql - 选择查询将查看破折号左右的数字并根据两个值执行选择顶部
- javascript - 如何获取要显示的电话验证器信息
- firebase - getValue 返回的对象与列表视图不兼容
- reactjs - 当用户点击 react-google-maps 中的地图或标记时执行操作
- c# - c# form keydown(改变变量)
- ssis - SSIS - 如何使用变量的值来确定 ForEachLoop 容器?