Create CI pipeline and mvn wrapper - #3
Conversation
📝 WalkthroughWalkthroughAdds a Maven wrapper (Unix + Windows), Maven wrapper config, project editorconfig, Spotless plugin, and a GitHub Actions CI workflow that checks out code, sets up Java 25, runs Maven tests via the wrapper, and enforces formatting with Spotless. Changes
Sequence Diagram(s)sequenceDiagram
participant GitHubActions
participant Runner as Ubuntu Runner
participant Repo as Repository (mvnw + pom.xml)
participant Maven as Maven (via mvnw)
participant Spotless as Spotless Plugin
GitHubActions->>Runner: start workflow (push/PR)
Runner->>Repo: checkout code
Runner->>Runner: setup Java 25 (Temurin)
Runner->>Repo: run `./mvnw -B test`
Repo->>Maven: mvnw bootstraps/ensures Maven distro
Maven->>Repo: execute tests
Runner->>Repo: run `./mvnw -B spotless:check`
Maven->>Spotless: run formatting checks
Spotless-->>Runner: report success/failure
Runner-->>GitHubActions: workflow result
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Fix all issues with AI agents
In @.github/workflows/ci.yml:
- Around line 26-27: The CI workflow step currently runs "./mvnw -B
spotless:checks" and the step name is "Run spotless checks"; change the Maven
goal to the singular "spotless:check" (update the run value) to match the
pom.xml expectation and ensure the workflow file ends with a trailing newline
(add a final newline at EOF) so POSIX tools and git hooks are satisfied.
In `@pom.xml`:
- Around line 121-137: The CI uses the wrong Spotless Maven goal name—replace
any use of "spotless:checks" with the correct singular goal "spotless:check" in
the GitHub Actions CI workflow step that invokes Maven; this aligns with the
Spotless plugin (com.diffplug.spotless:spotless-maven-plugin) declared in the
POM and will prevent the "Unknown lifecycle phase" failure.
🧹 Nitpick comments (1)
.github/workflows/ci.yml (1)
9-11: Consider adding explicit permissions for security hardening.Adding explicit permissions follows the principle of least privilege and prevents potential security issues if the
GITHUB_TOKENdefault permissions change.Suggested addition after line 8
jobs: build: runs-on: ubuntu-latest permissions: contents: read steps:
Closes #1
Closes #2
Summary by CodeRabbit