Skip to content

Packaging up a plugin

Stephen Ritchie edited this page Apr 24, 2018 · 4 revisions

Introduction

To prepare a plugin for Jenkins it must be packaged into an .hpi file. Maven is used to package up your source code into this form, and the steps are outlined below.

Steps

  1. From the command line, navigate to your plugin directory. The level you need to be at is that one with the pom.xml in it.
  2. *Run mvn install. Depending on your system this can take a few minutes to complete.
  3. The .hpi file should be located in /target. If it is not something probably went wrong. You can refer to the Jenkins Plugin Tutorial for more information regarding the creation of your .hpi file

*While mvn install is the proper base command to run to package a plugin, we found that running the following command works best. It ignores FindBugs which can cause the build to failure for reasons that shouldn't stop it from building.

mvn clean install -Dfindbugs.skip=true

Clone this wiki locally