Thank you for your interest in contributing! This guide covers everything you need to build, test, and run the plugin locally.
| Tool | Required version | Install |
|---|---|---|
| JDK | 17 (project default) or 21 | Adoptium / brew install openjdk@17 |
| Maven | 3.8 or newer | maven.apache.org / brew install maven |
| Git | Any recent version | pre-installed on macOS/Linux |
| IDE (recommended) | IntelliJ IDEA (Community or Ultimate) | jetbrains.com |
Windows: use WSL 2 and follow the Linux instructions inside the WSL shell.
# 1. Clone the repository
git clone https://github.com/jenkinsci/parallels-devops-jenkins-plugin.git
cd parallels-devops-jenkins-plugin
# 2. Verify Java version (should print 17.x or 21.x)
java -version
# 3. Verify Maven version (must be 3.8+)
mvn -version
# 4. Compile once to populate the local Maven cache (~2 min on first run)
make buildAll day-to-day tasks are automated via the Makefile at the repo root.
| Target | Command | Description |
|---|---|---|
make build |
mvn clean compile |
Compiles Java sources. Fast, no packaging overhead. |
make test |
mvn test |
Runs all JUnit / JenkinsRule tests and prints pass/fail. |
make run |
mvn hpi:run |
Starts a local Jenkins at http://localhost:8080/jenkins with the plugin hot-loaded. Use JENKINS_PORT to change the port. |
make package |
mvn clean package -DskipTests |
Produces target/parallels-devops-jenkins-plugin.hpi. |
make clean |
mvn clean && rm -rf work/ |
Removes all build artefacts and the local Jenkins work directory. |
Both variables can be passed on the command line or exported in your shell:
# Change the Jenkins port (default: 8080)
make run JENKINS_PORT=9090
# Pin a specific Jenkins core version at runtime
make run JENKINS_VERSION=2.479.1
# Combine both
make run JENKINS_PORT=9090 JENKINS_VERSION=2.479.1make runOnce Maven prints Jenkins is fully up and running, open your browser to:
http://localhost:8080/jenkins
Navigate to Manage Jenkins → Manage Nodes and Clouds → Configure Clouds to see the Parallels DevOps cloud provider listed.
Press Ctrl+C in the terminal to stop the server.
make testThe Maven Surefire output will clearly show each test class, the number of tests run, and any failures or errors. Exit code 0 means all tests passed.
make packageThe finished plugin file will be at:
target/parallels-devops-jenkins-plugin.hpi
You can install this .hpi manually into any Jenkins instance via Manage Jenkins → Plugins → Advanced → Deploy Plugin.
Cause: Maven is using a JDK newer than the project's bytecode target (e.g. JDK 25 compiled classes being loaded by a JDK 17 runtime).
Fix: The Makefile sets JAVA_HOME to JDK 21 automatically on macOS via /usr/libexec/java_home. If you're on Linux or the auto-detection fails, set it explicitly before running make:
export JAVA_HOME=/path/to/jdk-21
make runCause: Port 8080 (or whichever port is configured) is already occupied by another process.
Fix: Either stop the conflicting process or use a different port:
# Find the PID using port 8080
lsof -ti tcp:8080
# Or just run Jenkins on a different port
make run JENKINS_PORT=9090Cause: Local Maven repository cache is empty or corrupted; required Jenkins BOM/parent artefacts have not been downloaded yet.
Fix: Run the following to force a cache refresh:
mvn dependency:resolve -U
make testIf behind a corporate proxy, also configure ~/.m2/settings.xml with the proxy settings (see Maven proxy docs).
Cause: IntelliJ has not imported the Maven project, or the Maven model needs refreshing.
Fix:
- Open the project root in IntelliJ IDEA.
- Right-click
pom.xml→ Add as Maven Project (if not already done). - In the Maven tool window, click Reload All Maven Projects (circular-arrow icon).
- Make sure the Project SDK is set to JDK 17 under File → Project Structure.
Cause: The running Jenkins instance holds a file lock on the deployed .hpi or its exploded directory inside work/.
Fix: Stop the running make run process first (Ctrl+C), then run make clean.
- Java source lives under
src/main/java/. Follow standard Java conventions (4-space indent, Javadoc for public APIs). - Jelly views live under
src/main/resources/. - No
System.out.printlnin production code — usejava.util.logging.Logger.
- Fork the repository and create a feature branch:
git checkout -b feat/my-feature - Make your changes and ensure
make testpasses. - Push your branch and open a Pull Request against
main. - Fill in the PR template and link any relevant issues.
| Platform | Status |
|---|---|
| macOS (Apple Silicon / Intel) | Verified |
| Linux (Ubuntu 22.04+) | Verified |
| Windows via WSL 2 | Acceptable (not natively required) |