Skip to content

Allow to clean without mvn#1602

Merged
wmdietl merged 1 commit into
masterfrom
mvn-clean
Mar 20, 2026
Merged

Allow to clean without mvn#1602
wmdietl merged 1 commit into
masterfrom
mvn-clean

Conversation

@wmdietl
Copy link
Copy Markdown
Member

@wmdietl wmdietl commented Mar 20, 2026

No description provided.

Copilot AI review requested due to automatic review settings March 20, 2026 18:03
@wmdietl wmdietl enabled auto-merge (squash) March 20, 2026 18:05
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the Maven example Makefile so make clean can run even when Maven isn’t installed.

Changes:

  • Alters the clean target to ignore failures from mvn -q clean.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


clean:
mvn -q clean
-mvn -q clean
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

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

Prefixing the Maven command with - makes make clean ignore all mvn clean failures (including real build/cleanup errors), not just the 'mvn not found' case. A more robust approach is to conditionally run Maven only if it exists on PATH (e.g., command -v mvn ... guarded mvn -q clean), so legitimate Maven failures still surface while still allowing cleaning without Maven.

Suggested change
-mvn -q clean
command -v mvn >/dev/null 2>&1 && mvn -q clean

Copilot uses AI. Check for mistakes.
@wmdietl wmdietl merged commit 68b7b63 into master Mar 20, 2026
46 checks passed
@wmdietl wmdietl deleted the mvn-clean branch March 20, 2026 19:42
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.

2 participants