Skip to content

Cannot find 'removeWildcardImports' in class com.diffplug.spotless.maven.java.Java #2529

Closed as not planned
@angeloimm

Description

@angeloimm

Hi

I'm using maven 3.9.9 and this plugin

Image

congifuration

    <plugin>
      <groupId>com.diffplug.spotless</groupId>
      <artifactId>spotless-maven-plugin</artifactId>
      <version>2.44.5</version>
      <executions>
        <execution>
          <goals>
            <goal>apply</goal>  <!-- for auto-formatting -->
          </goals>
          <phase>package</phase>
        </execution>
      </executions>
      <configuration>
        <java>
          <googleJavaFormat>
            <version>1.27.0</version> <!-- or latest -->
            <style>GOOGLE</style>
          </googleJavaFormat>
          <removeUnusedImports /> <!-- self-explanatory -->
          <!--<removeWildcardImports />-->
          <includes>
            <include>src/main/java/**/*.java</include>
            <include>src/test/java/**/*.java</include>
          </includes>
        </java>
      </configuration>
    </plugin>

The congiration <removeWildcardImports /> seems to generate error. When I uncomment it I get this error

Image

I tried both by using

          <googleJavaFormat>
            <version>1.27.0</version> <!-- or latest -->
            <style>GOOGLE</style>
          </googleJavaFormat>

and without googleJavaFormat

It doesn't work... I always get the same error. Is there any workaround?
I do really want to remove all wildcarts imports
Thank you

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions