spotless-maven-plugin fails with "No valid license found" when using IntelliJ IDEA Ultimate
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- java
- Domain
- build-system, tooling
Research direction
Start with the spotless-maven-plugin IntelliJ formatter integration and the command invocation shown in the issue, then compare it with IntelliJ's working format.sh invocation on macOS. Reproduce with IntelliJ IDEA Ultimate 2025.1.1 and the supplied Maven configuration; done means Maven formatting can use the active license, or the limitation and supported workaround are documented.
Written by the indexing model from the issue text.
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.
- Dominant language
- Java
- Stars
- 5.7k
- Forks
- 560
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 43
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from diffplug/spotless
-
Difficulty 5/5 Over a week Newbie friendliness 15/100
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
-
Difficulty 3/5 1-2 days Newbie friendliness 66/100
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
-
Difficulty 4/5 3-5 days Newbie friendliness 52/100
All issues in diffplug/spotless
Similar issues
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 90/100
apache/cloudstack#14222 ·
-
[BUG]茶杯方块在取茶时会引发崩溃 Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
1.0.0-alpha2 Type/Improvement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
wso2/dpdp-accelerator#272 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
infinispan/infinispan#18150 ·
-
area/frontend
Difficulty 2/5 1-3 hours Newbie friendliness 65/100