expandWildcardImports issue for maven multi module projects

Open
#2,946 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
58/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
java
Domain
build-system

Research direction

Clone the linked reproduction repository and run mvn spotless:apply; start with src/main/java/two/Two.java and the multi-module Maven configuration using Spotless Maven plugin 3.5.1. Trace how expandWildcardImports handles symbol resolution across modules. Done means the command completes without the reported lint error.

Written by the indexing model from the issue text.

Description

When using expandWildcardImports, mvn spotless:apply fails for maven multi module projects with the following error:

[ERROR] Failed to execute goal com.diffplug.spotless:spotless-maven-plugin:3.5.1:apply (default-cli) on project two: There were 1 lint error(s), they must be fixed or suppressed.
[ERROR]   src/main/java/two/Two.java:LINE_UNDEFINED expandwildcardimports(java.lang.IllegalStateException) Symbol resolution not configured: to configure consider setting a SymbolResolver in the ParserConfiguration (...)
[ERROR]   Resolve these lints or suppress with `<lintSuppressions>`

To reproduce:

git clone https://github.com/pdeneve/spotless-expand-wildcard-imports-issue.git
cd spotless-expand-wildcard-imports-issue
mvn spotless:apply

Spotless maven plugin version used = 3.5.1

Dominant language
Java
Stars
5.7k
Forks
560
Avg merge
1d 13h
Merged PRs (30d)
43

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from diffplug/spotless

All issues in diffplug/spotless

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.