Temporary tip: resolving impsort failures in indepenent-projects/* paths

158 views
Skip to first unread message

Holly Cummins

unread,
Sep 26, 2022, 4:57:58 AM9/26/22
to Quarkus Development mailing list
I’ve just delivered some changes to the impsort configuration in some of the projects in independent-projects/. 

This is good, because it resolves a problem where IDE settings and project settings for import order didn’t match. *However*, you may see some build failures along these lines: 

⚙️ Initial JDK 11 Build #

- Failing: independent-projects/extension-maven-plugin 
! Skipped: core/deployment core/runtime devtools/bom-descriptor-json and 731 more

📦 independent-projects/extension-maven-plugin

 Failed to execute goal net.revelc.code:impsort-maven-plugin:1.7.0:check (check-imports) on project quarkus-extension-maven-plugin: Imports are not sorted in /home/runner/work/quarkus/quarkus/independent-projects/extension-maven-plugin/src/test/java/io/quarkus/maven/ExtensionDescriptorMojoTest.java

What’s confusing is that if you go run  mvn net.revelc.code:impsort-maven-plugin:1.7.0:check locally, it will be clean. What’s going on?

It took me a while to figure it out, and it surprised me again this morning, so sharing. The problem is that impsort caches, and the caches aren’t cleaned by mvn clean. To properly clean the cache and update formatting, I found the following works: 

rm -rf independent-projects/*/*/*/.cache  
rm -rf independent-projects/*/*/.cache  
rm -rf independent-projects/*/.cache  
mvn net.revelc.code:impsort-maven-plugin:1.7.0:sort 
 
(This is a temporary issue that may affect some of us who have open changes in those projects.)

-H

--
Holly Cummins
Senior Principal Quarkus Software Engineer, Java Champion

Red Hat 


Reply all
Reply to author
Forward
0 new messages