Skip to content
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

Add documentation about what is the correct order of import packages #258

Open
manueljordan opened this issue Jan 29, 2021 · 3 comments
Open

Comments

@manueljordan
Copy link

I want to try do some commits into Spring Security, I created a Test class and I got the following:

./gradlew :spring-security-config:build -x test

> Task :spring-security-config:checkstyleTest
   --- --- See the HTML image shown below --- ---

> Task :spring-security-config:checkstyleTest FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':spring-security-config:checkstyleTest'.
> Checkstyle rule violations were found. See the report at: file:///Users/manueljordan/blueroom/sts-workspace-spring-security/spring-security/config/build/reports/checkstyle/test.html
  Checkstyle files with violations: 1
  Checkstyle violations by severity: [error:5]


* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

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 FAILED in 2m 26s

The errors are the following:

77

From above practically all are quick to fix, but about

  • Wrong order for 'org.apache.commons.logging.Log' import.

In the current README.adoc content, there is no mention about the order of import packages, so:

  • what must be the correct order?. Where is that list?

I am sharing the following that I configured long time ago for Spring Integration

88

@manueljordan
Copy link
Author

Hello

I fixed this situation with the following (for only one test class with some set of import packages - perhaps it would fail in other scenarios where other import packages are imported and are not related in the list shown below):

100

IMHO - It should added in the documentation

@philwebb philwebb added this to the 0.0.x milestone Jan 29, 2021
@philwebb
Copy link
Contributor

It would be good to document the order. The current setup is quite hard to find.

@manueljordan
Copy link
Author

Let me clone the project and do some experiments and then I will improve that class and javadoc, mostly the latter.
And then I am going to create some java and test classes in the samples directory

It would be for the next week (if all go well).

Thanks for your understanding

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants