Describe the bug [Problem]
Is not possible Build Spring Security
To Reproduce
In MacOS and Windows I have the following situation
I have STS 4.9.0.RELEASE for a workspace dedicated for Spring Security. And configured for Java 8 according with the Building from Source section.
Therefore for the IDE itself:
NOTE: From above - I removed the JRE 15 included in the IDE to avoid problems
Prior to import Spring Security I did
- git clone
- added remote repository
- git fetch
- git merge upstream/master
So I am sure I have the latest and stable code of the project
Then Spring Security is imported and furthermore to be sure, I change for the Spring Security project its JRE from 15 to 8 as follows:
And furthermore is mandatory fix the following:
Remove JRE 15 (I)
Remove JRE 15 (II)
Add JDK 8 (I)
Add JDK 8 (II)
The importation project was successful and configured fine to work with JDK 8.
Just in case I do the following:
Now according with the Building from Source section is time to execute ./gradlew install, therefore through the IDE
It works fine as follows:
Therefore all the required dependencies are downloaded and available.
Now according with the Building from Source section is time to execute ./gradlew build, therefore through the IDE
So the process starts:
But it fails with:
The message is:
Execution failed for task ':checkstyleNohttp'.
> java.lang.IllegalStateException: Could not load file 'etc/nohttp/allowlist.lines'
The same happens in other Machine on Windows 10, with a dedicated and isolated workspace for Spring Security.
Expected behavior It should Build without any problem.
Comment From: manueljordan
If through the IDE I do the following:
It to represent the ./gradlew build -x test command execution then it fails with again with:
But through a Terminal with ./gradlew build -x test passes.
...
> Task :spring-security-test:compileTestJava
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.6.1/userguide/command_line_interface.html#sec:command_line_warnings
BUILD SUCCESSFUL in 9m 36s
633 actionable tasks: 125 executed, 4 from cache, 504 up-to-date
A build scan was not published as you have not authenticated with server 'ge.spring.io'.
So, why fails in the IDE and not in the Terminal?
Comment From: jzheaux
Thanks for the report, @manueljordan. I was able to reproduce the error you described, and I will take a look.
In the meantime, it sounds like you have a workaround, which is to build from the terminal.
Comment From: manueljordan
Thank you. Being curious, did you get the same error in the same STS IDE or perhaps with other?.
Not sure if the error would be based on the IDE , it because through the Terminal works fine
Comment From: jzheaux
What appears to be happening is Eclipse isn't propagating the working directory through to the underlying NoHttpCheck Checkstyle task when running build -> checkstyleNohttp.
You can can configure the build Run Configuration in Eclipse to skip the checkstyleNohttp task. In Project -> Run Configurations, find or create a Gradle Task where the task is build. Then, in its Project Settings, add -xcheckstyleNohttp as a program argument.
You can then run checkstyleNoHttp separately.
Comment From: jzheaux
I'm not sure what else can be done on the Spring Security side of things as this appears to be related to how Eclipse, Gradle, and Checkstyle work together.
I'm going to close this task as answered; however, please feel free to add more details if you feel like there's something we can help with.
Comment From: manueljordan
Hi @jzheaux
I'm not sure what else can be done on the Spring Security side of things as this appears to be related to how Eclipse, Gradle, and Checkstyle work together.
Should be add a call or refer to Martin Lippert to this post?