spotless-maven-plugin fails with "No valid license found" when using IntelliJ IDEA Ultimate
- Dominant language
- Java
- Stars
- 5.6k
- Forks
- 559
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 34
Description
Hi Spotless team 👋
**Description:**
I'm using the `spotless-maven-plugin` (`version 2.45.0-SNAPSHOT`) with the IntelliJ IDEA formatter integration on macOS (I'm using 2.45.0-SNAPSHOT, built locally, since there hasn't been a stable release yet that includes IntelliJ (idea) support for Maven.). My IntelliJ version is:
```
IntelliJ IDEA 2025.1.1 (Ultimate Edition)
```
Even though my license is active and the IDE is registered properly (I can use IntelliJ with no issue via GUI), running `mvn spotless:check` fails with the following error:
```
> arguments: [/Users/ozlemulag/Applications/IntelliJ IDEA Ultimate.app/Contents/MacOS/idea, format, -s, /Users/ozlemulag/Applications/ozlemulag/Documents/codestyle_settings.xml, -charset, UTF-8, /private/var/...Temp.java]
> exit code: 7
> stdout: No valid license found
> stderr:
> [JRSAppKitAWT markAppIsDaemon] failed. SetApplicationIsDaemon returned -50
> WARN - CommonProxy - main authenticator is not yet registered
```
Here's my relevant Maven configuration:
```
com.diffplug.spotless
spotless-maven-plugin
2.45.0-SNAPSHOT
check
apply
src/**/*.java
/Users/ozlemulag/Documents/codestyle_settings.xml
false
/Users/ozlemulag/Applications/IntelliJ IDEA Ultimate.app/Contents/MacOS/idea
```
**Additional Notes:**
If I run the formatter manually using format.sh like this:
```
find -name "*.java" -print0 | xargs -0 /Users/ozlemulag/Applications/IntelliJ\ IDEA\ Ultimate.app/Contents/bin/format.sh -s /Users/ozlemulag/Documents/codestyle_settings.xml
```
…then everything works fine. Formatting is applied successfully to all files.
It seems that when Spotless invokes IntelliJ, it is unable to detect the active license.
**Question:**
Is this a known limitation?
Is there a way to allow Spotless to access the IntelliJ license when running via Maven/CLI?
Thanks a lot in advance 🙏
Let me know if you'd like me to try with any debugging flags or extra settings.
Contributor guide
Assessment
This issue has not been assessed yet.