1.下载插件模板
命令:mvn archetype:generate -Dfilter=io.jenkins.archetypes:plugin
如果报错:Your filter doesn't match any archetype, so try again with another value
这是因为maven在本地仓库根目录archetype-catalog.xml文件中没找到groupId为io.jenkins.archetypes的archetype,之后会在远端仓库的该文件中查找,如果还是没找到则出现上述问题。此时需要下载文件 archetype-catalog.xml放置到maven的仓库repository下面。
2.本地运行项目
1.运行项目:mvn hpi:run