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

spring-security-samples/servlet/spring-boot/java/oauth2/login doesn't run #202

Open
augchan42 opened this issue Feb 6, 2024 · 2 comments

Comments

@augchan42
Copy link

To reproduce:
gh repo clone spring-projects/spring-security-samples
cd spring-security-samples/
cd servlet/spring-boot/java/oauth2/login/
./gradlew bootRun

Gives the following error:

hosermage@LAPTOP-1RPE37PF:~/projects/spring-security-samples/servlet/spring-boot/java/oauth2/login$ ./gradlew bootRun

FAILURE: Build failed with an exception.

* Where:
Build file '/home/hosermage/projects/spring-security-samples/servlet/spring-boot/java/oauth2/login/build.gradle' line: 2

* What went wrong:
Could not compile build file '/home/hosermage/projects/spring-security-samples/servlet/spring-boot/java/oauth2/login/build.gradle'.
> startup failed:
  build file '/home/hosermage/projects/spring-security-samples/servlet/spring-boot/java/oauth2/login/build.gradle': 2: only alias(libs.plugins.someAlias) plugin identifiers where `libs` is a valid version catalog

  For more information on the plugins {} block, please refer to https://docs.gradle.org/8.3/userguide/plugins.html#sec:plugins_block in the Gradle documentation.

   @ line 2, column 2.
        alias(libs.plugins.org.springframework.boot)
      ^

  build file '/home/hosermage/projects/spring-security-samples/servlet/spring-boot/java/oauth2/login/build.gradle': 3: only alias(libs.plugins.someAlias) plugin identifiers where `libs` is a valid version catalog

  For more information on the plugins {} block, please refer to https://docs.gradle.org/8.3/userguide/plugins.html#sec:plugins_block in the Gradle documentation.

   @ line 3, column 2.
        alias(libs.plugins.io.spring.dependency.management)
      ^

  2 errors


* 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.

BUILD FAILED in 530ms
hosermage@LAPTOP-1RPE37PF:~/projects/spring-security-samples/servlet/spring-boot/java/oauth2/login$
@marcusdacoregio
Copy link
Contributor

Hi, @augchan42.

Can you try running from the root project ./gradlew :servlet:spring-boot:java:oauth2:login:bootRun?

@augchan42
Copy link
Author

That works. Also adding the toml file to servlet/spring-boot/java/oauth2/login/gradle/libs.versions.toml allows you to run ./gradlew bootRun from the login directory

Docs could use updating for people unfamiliar with gradle (like myself)

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

No branches or pull requests

2 participants