-
Notifications
You must be signed in to change notification settings - Fork 465
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
Spotless XML formatting failing with parallel build #828
Comments
@aaime Sorry, for causing the effort of opening a new PR. Since you addressed this directly in #492, I thought you are aware that the patch was applied with Eclipse WTP 4.13.0. It is of course possible to provide back-ports for this fix. But since Eclipse WTP 4.7.3a the interfaces changed quite a bit. So I really need a good reason to spend the effort. What's the benefit of |
On the issue of backport, Java 11 is required from |
@fvgh I simply copied it from the documentation: No particular WTP version is required for us, the project is IDE agnostic. But needs to work with both Java 8 and Java 11 (the two versions of Java supported by GeoTools and GeoServer). Tried with 4.16.0, seems to work fine. Do you have any feeback about running the plugin directly? I can open a seprate ticket for that:
Other formatters I've been playing with (e.g., the revelc one) also do not seems to be affected by the above (but each have issues of their own). |
@aaime , I will updated the documentation. About the direct plugin call: |
@fvgh I've tried again today, with Spotless 2.20, still getting the NPE. I guess it was not a duplicate after all?
Ah, here is how I'm invoking Spotless (forcing the initialize phase so that a property with the location of a config file for WTP can be set up):
|
Never mind, forgot to upgrade the WTP version, sorry for the noise! |
Using Maven 3.6.3, Spotless maven plugin 2.9.0, Eclipse WTP 4.7.3a.
I'm trying out the Spotless/WTP combo for format XML files in the GeoServer project, it's failing with parallel builds with error messages like this one (due to parallel build, some other message is in the mix, sorry about it):
A testable branch with full configuration is here:
https://github.com/aaime/geoserver/tree/spotless-wtp
Runining the pluging directly won't work, as the "initialize" phase does not seem to be invoked, we use it to set a property
containing the location of the config files (including spotless one). I don't have the same problem with other plugins, such as PMD, checkstyle and the like, not sure what's different about spotless.
Forcing maven to run the
process-sources
phase seems to do the trick, it goes through initialize first, and then :mvn process-sources -nsu -T6 -fae -Prelease,communityRelease
The extra profiles bring into the build all optional modules, totalling 200+ Maven modules, on my machine it won't fail with less than that. The
-T6
makes maven use 6 out of the 8 available cores (Ryzen 1700+, 8 actual phisical cores). Found it fails with -T4
though.The text was updated successfully, but these errors were encountered: