Jenkins插件开发-Maven问题:未知打包:hpi
我正在尝试开始使用 Mac OSX 为 Jenkins 开发插件。
首先,当我运行“mvn hpi:create”时,需要很长时间才能 下载所有文件,每个文件最多几分钟。而且还很多 文件数量。总时间4-5小时!为什么这么慢?
然后,当我运行“mvn package”时,出现此错误:
[ERROR]
[ERROR] The project org.sample.jenjondev:firstplugin:1.0-SNAPSHOT
(/Users/jonatanekstedt/Developer/jenkins/firstplugin/pom.xml) has 1 error
[ERROR] Unknown packaging: hpi @ line 12, column 14
Why does maven not Know about hpi?我使用 Maven 3.0.4。
这是我的 pom.xml:
<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>1.448</version><!-- which Jenkins version is this plugin
built against? -->
</parent>
<groupId>org.sample.jenjondev</groupId>
<artifactId>firstplugin</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>hpi</packaging>
<repositories>
<repository>
<id>m.g.o-public</id>
<url>http://maven.glassfish.org/content/groups/public/</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>m.g.o-public</id>
<url>http://maven.glassfish.org/content/groups/public/</url>
</pluginRepository>
</pluginRepositories>
</project>
我已经更改了
I am trying to start developing plug-ins for Jenkins with Mac OSX.
First, when I run 'mvn hpi:create', it takes a reeaally long time to
download all the files, up to several minutes per file. And it's a lot
of files. Total time is 4-5 hours! Why is it so slow?
Then, when I run 'mvn package' I get this error:
[ERROR]
[ERROR] The project org.sample.jenjondev:firstplugin:1.0-SNAPSHOT
(/Users/jonatanekstedt/Developer/jenkins/firstplugin/pom.xml) has 1 error
[ERROR] Unknown packaging: hpi @ line 12, column 14
Why does maven not know about hpi? I use Maven 3.0.4.
This is my pom.xml:
<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>1.448</version><!-- which Jenkins version is this plugin
built against? -->
</parent>
<groupId>org.sample.jenjondev</groupId>
<artifactId>firstplugin</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>hpi</packaging>
<repositories>
<repository>
<id>m.g.o-public</id>
<url>http://maven.glassfish.org/content/groups/public/</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>m.g.o-public</id>
<url>http://maven.glassfish.org/content/groups/public/</url>
</pluginRepository>
</pluginRepositories>
</project>
I have changed the <version> of Jenkins to the version on my computer, 1.448.
How can I resolve this error?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
它很慢,因为 Maven Glassfish 服务器当前已关闭,并且没有预计修复时间。詹金斯的人已经设置了一面镜子,我们可以用它来代替。在您的 pom.xml 中,而不是使用
mgo-public
存储库,请使用:另外,将详细信息添加到您的
.m2/settings.xml
如本教程顶部所示,允许使用简短的命名为“hpi”。It's slow because the Maven Glassfish server is currently down, with no ETA for a fix. The Jenkins guys have set up a mirror that we can use as a replacement. In your pom.xml, instead of the
m.g.o-public
repos, use:Also, add the details to your
.m2/settings.xml
as shown at the top of this tutorial to allow the use of the short name "hpi".