Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,4 @@ src/main/webapp/js/bundles
.project
.factorypath

# VS Code project files
.vscode

*.dylib
3 changes: 3 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"recommendations": ["vscjava.vscode-java-pack", "vitest.explorer"]
}
29 changes: 29 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"version": "2.0.0",
"configurations": [
{
"name": "Debug Frontend",
"type": "chrome",
"request": "launch",
"preLaunchTask": "Run Jenkins",
"url": "http://localhost:8080/jenkins",
"pathMapping": {
"/jenkins/plugin/pipeline-graph-view": "${workspaceFolder}/src/main/webapp"
}
},
{
"name": "Debug Java",
"type": "java",
"request": "attach",
"preLaunchTask": "Run Jenkins",
"hostName": "localhost",
"port": 8000
}
],
"compounds": [
{
"name": "Debug All",
"configurations": ["Debug Java", "Debug Frontend"]
}
]
}
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"java.compile.nullAnalysis.mode": "automatic"
}
70 changes: 70 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "Run Jenkins",
"type": "shell",
"command": "mvn hpi:run -Dskip.npm -P quick-build",
"options": {
"env": {
// Do not wait for debugger to connect (suspend=n), unlike mvnDebug
"MAVEN_OPTS": "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8000"
}
},
"dependsOn": ["Build Frontend"],
"presentation": {
"focus": true,
"panel": "dedicated",
"clear": true
},
"isBackground": true,
"problemMatcher": [
{
"pattern": [
{
"regexp": "\\b\\B",
"file": 1,
"location": 2,
"message": 3
}
],
"background": {
"activeOnStart": true,
"beginsPattern": ".*INFO.*Started initialization.*",
"endsPattern": ".*INFO.*Jenkins is fully up and running.*"
}
}
]
},
{
"label": "Build Frontend",
"type": "shell",
"command": "npm run build:dev",
"group": "build",
"presentation": {
"focus": true,
"panel": "dedicated",
"clear": true
},
"isBackground": true,
// https://github.com/vitejs/vite/discussions/20164
"problemMatcher": [
{
"pattern": [
{
"regexp": ".",
"file": 1,
"location": 2,
"message": 3
}
],
"background": {
"activeOnStart": true,
"beginsPattern": ".*build started*",
"endsPattern": ".*built in.*"
}
}
]
}
]
}
27 changes: 21 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,20 +36,35 @@ Prerequisites: _Java_ and _Maven_.

```console
$ java -version
openjdk 17.0.13 2024-10-15
OpenJDK Runtime Environment (build 17.0.13+11-Ubuntu-2ubuntu124.04)
OpenJDK 64-Bit Server VM (build 17.0.13+11-Ubuntu-2ubuntu124.04, mixed mode, sharing)
openjdk version "21.0.7" 2025-04-15 LTS
```

- Ensure Maven >= 3.9.9 is installed and included in the PATH environment variable.
- Ensure Maven >= 3.9.9 is installed and included in the `PATH` environment variable.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we include a maven wrapper 🤔

not one for this PR probably but something to think about @timja

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have no strong opinion about it.


```console
mvn --version
$ mvn -version
Apache Maven 3.9.9 (8e8579a9e76f7d015ee5ec7bfcdc97d260186937)
```

### IDE configuration

See [IDE configuration](https://jenkins.io/doc/developer/development-environment/ide-configuration/)
See [IDE configuration](https://jenkins.io/doc/developer/development-environment/ide-configuration/).

### Debugging in Visual Studio Code

This repository comes preconfigured for debugging in [Visual Studio Code](https://code.visualstudio.com/). Beyond Java and Maven, you will need:

- The [recommended extensions](./.vscode/extensions.json)
- Node.js and NPM installed and in `PATH` (check recommended versions in [`pom.xml`](./pom.xml) > `properties`)
- Frontend dependencies installed with `npm install`

Then, in the [_Debug_ view](https://code.visualstudio.com/docs/debugtest/debugging), you can select between:

- `Debug Frontend` to debug the frontend code in a browser
- `Debug Java` to debug the Java code
- `Debug All` to debug both at the same time

When launching one of these, Visual Studio Code will automatically start the required processes, such as `npm run build:dev` and `mvn hpi:run`.

### CLI

Expand Down