To learn more about the architecture of the tool, see the ARCHITECTURE file.
-
Clone the repository
-
Install tools
i. Java 25
ii. Maven 3.9.15
-
Open the project in your favorite IDE.
Once you have installed the tools listed before, you can generate the jar by running the command,
mvn verifyThe JAR file will be available at the path plugin-modernizer-cli/target/jenkins-plugin-modernizer-999999-SNAPSHOT.jar.
This will run all the tests of the application. You can speed up the process by running the command:
mvn package -DskipTestsThe CLI is a Quarkus command mode application built with the
Picocli extension. The JAR is a Quarkus uber-jar, run it with java -jar.
To iterate on the CLI, use Quarkus dev mode (live reload) and pass the CLI arguments with quarkus.args:
mvn install -DskipTests -pl plugin-modernizer-core -am
mvn quarkus:dev -pl plugin-modernizer-cli -Dquarkus.args="dry-run --plugins badge --recipe AddCodeOwner"To build the native executable (plugin-modernizer-cli/target/jenkins-plugin-modernizer-999999-SNAPSHOT),
use the native profile. It needs Mandrel for Java 25 with GRAALVM_HOME set,
or Docker to build inside the Quarkus builder image:
mvn install -DskipTests -pl plugin-modernizer-core -am
mvn verify -Dnative -pl plugin-modernizer-cli -Dquarkus.native.container-build=trueThe native build needs to know what is used through reflection, resources and class initialization at run time.
This configuration lives in the nativeimage package of the CLI, in application.properties (quarkus.native.*)
and in META-INF/native-image. MainITCase runs against the native executable when built with -Dnative.
Logging uses Quarkus logging (JBoss Log Manager). The console output is configured in
plugin-modernizer-cli/src/main/resources/application.properties, per plugin log files are written by PluginLogHandler.
This project includes a .gitpod.yml configuration file, which allows to easily work on it using Gitpod. When the Gitpod workspace starts, the required versions of Java and Maven are automatically installed. Also, the following command is executed at startup:
mvn clean install -DskipTestsTo test the changes, execute the following command:
mvn testRun mvn clean verify -Penable-jacoco from the repository root to collect unit and
integration test coverage. Docker must be running for the CLI integration tests.
The combined report for core and CLI application code is generated at
plugin-modernizer-cli/target/site/jacoco/index.html.
All proposed changes are submitted and reviewed through a GitHub pull request. To submit a pull request:
-
Make sure your changeset is not introducing a regression by running mvn verify
-
Create a branch prefixed with:
i. feature/ for a new enhancement
ii. fix/ for a bugfix
iii. docs/ for documentation changes
-
Commit your changes to this new branch
-
Push the branch to your fork of the repository.
-
In the GitHub Web UI, select the New pull request option
-
Follow the pull request template
-
Click the Create pull request button.
The pull request will be built in ci.jenkins.io