-
Notifications
You must be signed in to change notification settings - Fork 460
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Maven scanning time issue for big projects #729
Comments
That seems like a fine workaround to me. If you make the PR, I'd be happy to merge it and publish. We'll note the change in the changelog, and worst-case we can always revert it. Our maven build is a bit tricky. Sounds like you already navigated it, but while you're in the guts of it, #554 is an option too. |
Thanks for your response and sorry for my late reply. |
Possibly fixed in |
It solves my issue. |
Huzzah! |
Hi,
I have a project that has a directory with an insane amount of code that I don't want spotless to consider (the code inside this directory is used as an input for some tests).
I'm providing spotless with an include/exclude configuration that should skip said directory.
Spotless takes over 90 seconds to complete.
I looked at the code for the maven plugin and it seems that the files spotless works on are computed by a 3rd party as follows:
spotless/plugin-maven/src/main/java/com/diffplug/spotless/maven/AbstractSpotlessMojo.java
Lines 204 to 210 in 48b5cb9
FileUtils.getFiles
is provided by org.codehaus.plexus:plexus-utils:3.0.8 which is a transitive dependency of org.codehaus.plexus:plexus-resources:1.0.1I've checked to see if the problem comes from the plexus-utils, and indeed the folder scan is slow (probably doesn't skip entire directories).
This issue was fixed in a later version of plexus-utils and I verified that it works much faster when using its latest version - 3.3.0
The direct dependency spotless uses (org.codehaus.plexus:plexus-resources:1.0.1) has a newer version (1.1.0) that uses org.codehaus.plexus:plexus-utils:3.0.22 - but it doesn't fix the issue.
I can suggest the following solutions:
baseDir
What are your thoughts?
I'd be happy to help with a PR if needed.
The text was updated successfully, but these errors were encountered: