Skip to content

Create CI pipeline and mvn wrapper - #3

Merged
fmazmz merged 5 commits into
mainfrom
workflow/issue1-create-ci-pipeline-and-mvn-wrapper
Feb 6, 2026
Merged

Create CI pipeline and mvn wrapper#3
fmazmz merged 5 commits into
mainfrom
workflow/issue1-create-ci-pipeline-and-mvn-wrapper

Conversation

@fmazmz

@fmazmz fmazmz commented Feb 5, 2026

Copy link
Copy Markdown
Member
  • Created mvn wrapper so we make sure all builds and pipelines are running the same maven distro / version.
  • Added maven spotless plugin with simple config to start with.
  • Added a simple CI workflow to run on PRs and on push to main branch.

Closes #1
Closes #2

Summary by CodeRabbit

  • Chores
    • Added CI workflow to run tests and code-quality checks on PRs and main branch updates.
    • Added Maven wrapper tooling to standardize builds across environments (includes Windows and Unix bootstraps).
    • Integrated automated code formatting and import cleanup into the build process.
    • Added project editor configuration to enforce consistent whitespace, encoding, and line endings.

@coderabbitai

coderabbitai Bot commented Feb 5, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

Adds 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

Cohort / File(s) Summary
CI Workflow
.github/workflows/ci.yml
Adds GitHub Actions workflow triggered on pushes to main and pull requests; sets up Ubuntu runner, configures Temurin Java 25, uses Maven caching, runs ./mvnw -B test and ./mvnw -B spotless:check.
Maven Wrapper Scripts
mvnw, mvnw.cmd, .mvn/wrapper/maven-wrapper.properties
Adds Unix and Windows Maven wrapper scripts and properties targeting Maven 3.8.7 with download, extraction, checksum validation, OS-specific handling, and caching logic.
Build & Formatting
pom.xml, .editorconfig
Adds spotless-maven-plugin (v2.43.0) configuration for Java formatting and an .editorconfig to enforce UTF-8, LF, 4-space indentation (YAML override 2).

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
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐰 I fetched the wrappers, tuned the build song,
CI hums softly and tests run along,
Spotless trims whiskers and lines that stray,
Cross-platform paws hop the dev way,
Pipelines now cheer — a carrot for play!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Create CI pipeline and mvn wrapper' directly and clearly summarizes the main changes: CI workflow setup and Maven wrapper configuration.
Linked Issues check ✅ Passed The PR addresses the linked issue #1 by implementing a CI pipeline with Maven wrapper as required, including spotless integration.
Out of Scope Changes check ✅ Passed All changes align with the stated objective: CI workflow, Maven wrapper setup, and supporting configuration files (.editorconfig) are directly related to issue #1.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch workflow/issue1-create-ci-pipeline-and-mvn-wrapper

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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_TOKEN default permissions change.

Suggested addition after line 8
jobs:
  build:
    runs-on: ubuntu-latest
    permissions:
      contents: read
    steps:

Comment thread .github/workflows/ci.yml Outdated
Comment thread pom.xml

@kristinaxm kristinaxm left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

great

@fmazmz
fmazmz merged commit f416823 into main Feb 6, 2026
3 checks passed
@fmazmz
fmazmz deleted the workflow/issue1-create-ci-pipeline-and-mvn-wrapper branch February 6, 2026 07:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

workflow: create .editorconfig to keep same development settings for all devs workflow: Create CI pipeline with a maven wrapper

3 participants