diffplug / diffplug/spotless

Bind to maven phase is not working

Open
#2,112 2 comments 5 reactions 0 assignees View on GitHub
bug-unconfirmed
Dominant language
Java
Stars
5.6k
Forks
559
Avg merge
1d 13h
Merged PRs (30d)
34

Description

If you are submitting a **bug**, please include the following:

Summary:
Applying the spotless maven plugin to specific phases is not working. For example, having binded check to validate phase and apply to verify, running verify also applies spotless.
Plugin goals run correctly individually eg `mvn spotless:check`

public git repo with example: https://gitlab.com/thahgr/spotless-maven-phases-test

to reproduce
- modify a file adding an incorrect identation (eg new line)
- run mvn verify

expected: the command should fail because spotless check failed
actual: the command succeeds while writing files with spotless::apply

versions:
maven: 3.8.1
java: 17
spotless: 2.43.0
google-java-plugin: 1.22.0
os: Ubuntu 22.04.4 LTS

Spotless configuration

```





${google.java.format.version}
GOOGLE
true


UNIX

```
```


spotless-check

check

verify


spotless-apply

apply

validate

```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.