spotless-maven-plugin fails with "No valid license found" when using IntelliJ IDEA Ultimate
- Vorherrschende Sprache
- Java
- Sterne
- 5.6k
- Forks
- 559
- Ø Merge
- 1 T. 14 Std.
- Gemergte PRs (30 T.)
- 43
Beschreibung
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.
Beitragsleitfaden
Rechercherichtung
Beginne mit der spotless-maven-plugin-IntelliJ-Formatter-Integration und dem im Issue gezeigten Befehlsaufruf und vergleiche sie anschließend mit Intellij's funktionierendem format.sh-Aufruf unter macOS. Reproduziere das Problem mit IntelliJ IDEA Ultimate 2025.1.1 und der bereitgestellten Maven-Konfiguration; abgeschlossen ist die Aufgabe, wenn die Maven-Formatierung die aktive Lizenz verwenden kann oder die Einschränkung und der unterstützte Workaround dokumentiert sind.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- java
- Bereich
- build-system, tooling
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 25/100