• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

jenkinsci/archetypes: Collection of Maven archetypes to get developers started

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

jenkinsci/archetypes

开源软件地址(OpenSource Url):

https://github.com/jenkinsci/archetypes

开源编程语言(OpenSource Language):

Java 76.1%

开源软件介绍(OpenSource Introduction):

Introduction

Maven archetypes to help you create new components involving Jenkins, such as plugins.

GitHub release

Usage

To see all currently released archetypes and pick one to instantiate:

mvn archetype:generate -Dfilter=io.jenkins.archetypes:

It is also possible to run this noninteractively:

mvn archetype:generate -B -DarchetypeGroupId=io.jenkins.archetypes -DarchetypeArtifactId=empty-plugin -DhostOnJenkinsGitHub=true -DarchetypeVersion=1.7 -DartifactId=somefeature

In olden times, people used mvn hpi:create or even a web-based tool to create new plugins. This has been deprecated in favor of the new archetypes, which cover more scenarios and require no special tooling.

The NetBeans IDE also offers a plugin for Jenkins development which offers a Jenkins plugin archetype via the File » New Project wizard.

If you have defined a mirror like this in your settings.xml you might not be able to use filter option as described above.

 <mirror>
   <id>repo.jenkins-ci.org-all</id>
   <url>https://repo.jenkins-ci.org/public</url>
   <mirrorOf>*</mirrorOf>
</mirror>

Changes

See GitHub Releases for changes.

For older versions, see the archive.

Development

To create a new archetype, file a pull request creating a new module, following the examples currently here. Important pieces:

  • pom.xml must have <packaging>maven-archetype</packaging>
  • should also have a <description>
  • src/main/resources/META-INF/maven/archetype-metadata.xml defines files and directories to be copied & processed
  • src/main/resources/archetype-resources/: the template for the new component (remember a sample .gitignore)
  • src/test/resources/projects/testInstall/{goal.txt,archetype.properties}: defines an integration test, proving that the archetype can not just be instantiated, but builds successfully thereafter
  • if it should have our standard templates for .gitignore, README.md, etc., then copy the maven-resources-plugin config in empty-plugin

Archetypes are expected to use technologies hosted in @jenkinsci (or a few other places pulled in by Jenkins core, such as @stapler). Other archetypes can be developed in a profile but will not be published. Releasing:

mvn -B release:{prepare,perform}

In addition to needing write permission to this repository, you must have been preauthorized to deploy to the io/jenkins/archetypes/ sector of OSSRH.

Artifacts will appear on Maven Central after a few minutes. But as noted in OSSRH-34275, the catalog only gets regenerated weekly; to check it:

curl -s http://repo1.maven.org/maven2/archetype-catalog.xml | xmlstarlet sel -R -I -t -c '//archetype[groupId="io.jenkins.archetypes"]'

If testing their appearance, be sure to use a clean environment:

docker run -ti --rm --name mvn --entrypoint /bin/bash maven:3.8.3-jdk-8



鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap