Build the plugin
Task
First import the cloned plugin repository into your IDE as a Maven project.
Run a full build by invoking Maven from command line or IDE integrated terminal:
mvn install
Watch the build log for any build failures and ensure a .hpi file is created in the target directory.
Optionally, install the built plugin to an existing Jenkins master instance.
Hints
Show / Hide
Maven Repositories
Add Jenkins plugin repositories to pom.xml or your .m2/settings.xml
<pluginRepositories>
<pluginRepository>
<id>repo.jenkins-ci.org</id>
<url>https://repo.jenkins-ci.org/public/</url>
</pluginRepository>
</pluginRepositories>
IntelliJ IDEA
- Add Maven framework support
- Configure JDK 8 as project SDK and set Java language level to 8
Ensure that following directories are marked as:
- Source Root: src/main/java
- Resources Root: src/main/resources
- Test Source Root: src/test/java
- Test Resources Root: src/test/resources
- Excluded: target