【发布时间】:2018-10-24 12:05:43
【问题描述】:
我是 Jenkins 插件开发的新手,正在尝试使用 maven 项目创建 Jenkins 插件,并使用 eclipse 作为 IDE。
以下是pom.xml文件结构:
<?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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>plugin</artifactId>
<version>3.4</version>
<relativePath />
</parent>
<groupId>io.jenkins.plugins</groupId>
<artifactId>JenkinPluginDev</artifactId>
<version>1.0</version>
<packaging>hpi</packaging>
<properties>
<jenkins.version>2.7.3</jenkins.version>
<java.level>7</java.level>
</properties>
<name>TODO Plugin</name>
<description>TODO</description>
<licenses>
<license>
<name>MIT License</name>
<url>https://opensource.org/licenses/MIT</url>
</license>
</licenses>
<!-- Assuming you want to host on @jenkinsci:
<url>https://wiki.jenkins.io/display/JENKINS/TODO+Plugin</url>
<scm>
<connection>scm:git:git://github.com/jenkinsci/${project.artifactId}-plugin.git</connection>
<developerConnection>scm:git:git@github.com:jenkinsci/${project.artifactId}-plugin.git</developerConnection>
<url>https://github.com/jenkinsci/${project.artifactId}-plugin</url>
</scm>
-->
<repositories>
<repository>
<id>repo.jenkins-ci.org</id>
<url>https://repo.jenkins-ci.org/public/</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>repo.jenkins-ci.org</id>
<url>https://repo.jenkins-ci.org/public/</url>
</pluginRepository>
</pluginRepositories>
</project>
maven 项目在“父”标签附近的 POM.xml 文件中有一些错误。
我尝试运行 maven 目标来解决问题,但它未能构建并在控制台中观察到以下错误消息。
下载: https://repo.jenkins-ci.org/public/org/jenkins-ci/plugins/plugin/3.4/plugin-3.4.pom [错误] 构建无法读取 1 个项目 -> [帮助 1] [错误]
[错误] 项目 io.jenkins.plugins:JenkinPluginDev:1.0
(C:\jenkinPluginDevelopment\JenkinPluginDev\pom.xml) 有 1 个错误
[错误] 不可解析的父 POM:无法传输工件 org.jenkins-ci.plugins:plugin:pom:3.4 从/到 repo.jenkins-ci.org (https://repo.jenkins-ci.org/public/): 对等体未通过身份验证并且 'parent.relativePath' 指向没有本地 POM @ 第 4 行,第 13 列 -> [帮助2]
[ERROR] [ERROR] 要查看错误的完整堆栈跟踪, 使用 -e 开关重新运行 Maven。
[错误] 使用 -X 重新运行 Maven 开关以启用完整的调试日志记录。
[ERROR] [ERROR] 有关错误和可能的解决方案的更多信息,>请阅读以下文章:
[错误] [帮助 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException [错误] [帮助 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException
任何线索...
【问题讨论】:
标签: java eclipse maven jenkins