-
Notifications
You must be signed in to change notification settings - Fork 486
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:
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
<version>2.45.0-SNAPSHOT</version>
<executions>
<execution>
<goals>
<goal>check</goal>
<goal>apply</goal>
</goals>
</execution>
</executions>
<configuration>
<java>
<includes>
<include>src/**/*.java</include>
</includes>
<idea>
<codeStyleSettingsPath>/Users/ozlemulag/Documents/codestyle_settings.xml</codeStyleSettingsPath>
<withDefaults>false</withDefaults>
<binaryPath>/Users/ozlemulag/Applications/IntelliJ IDEA Ultimate.app/Contents/MacOS/idea</binaryPath>
</idea>
</java>
</configuration>
</plugin>
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.