Compiling and installing an HPI plugin

So far we have learned how to set up the IntelliJ IDE, develop a basic plugin via extension points, and extend Jenkins. We learned about the project lifecycle and discovered new ways to extend Jenkins. In this section we will see how to build our final .HPI and install it onto the Jenkins system. To do this we will want to compile the plugin using Maven with the install target specified, and then load it into the Jenkins system. Let's get started.

To generate the final HPI package, open a command line window, navigate to your plugin directory, and enter the following command into the terminal:

#> mvn package

The compilation and packaging of the plugin take a few minutes to execute and complete. Once completed ...

Get Mastering Jenkins now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.