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

New default geb feature implementation #413

Merged
merged 7 commits into from
Oct 28, 2024

Conversation

matrei
Copy link
Contributor

@matrei matrei commented Oct 27, 2024

  • Rename feature geb to geb-with-webdriver-binaries and make it an optional feature
  • Add new default feature geb-with-testcontainers

- Rename feature `geb` to `geb-with-webdriver-binaries` and make it an optional feature
- Add new default feature `geb-with-testcontainers`
Copy link

@sbglasius sbglasius left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@matrei
Copy link
Contributor Author

matrei commented Oct 28, 2024

The build is failing right now when running tests.
This is mimicking what the test is trying to do:

mattias@mattias-z4-linux:/tmp/grailsforgetmp15664837821511079914$ ./gradlew build

FAILURE: Build failed with an exception.

* What went wrong:
Could not resolve all files for configuration ':buildSrc:buildScriptClasspath'.
> Could not resolve org.apache.groovy:groovy:4.0.24-SNAPSHOT.
  Required by:
      project :buildSrc > org.grails:grails-bom:7.0.0-SNAPSHOT:20241024.195419-118
      project :buildSrc > org.grails:grails-bom:7.0.0-SNAPSHOT:20241024.195419-118 > org.apache.groovy:groovy-ant:4.0.23
      project :buildSrc > org.grails:grails-bom:7.0.0-SNAPSHOT:20241024.195419-118 > org.apache.groovy:groovy-json:4.0.23
      project :buildSrc > org.grails:grails-bom:7.0.0-SNAPSHOT:20241024.195419-118 > org.apache.groovy:groovy-jmx:4.0.23
      project :buildSrc > org.grails:grails-bom:7.0.0-SNAPSHOT:20241024.195419-118 > org.apache.groovy:groovy-xml:4.0.23
      project :buildSrc > org.grails:grails-bom:7.0.0-SNAPSHOT:20241024.195419-118 > org.apache.groovy:groovy-bom:4.0.23
   > Could not resolve org.apache.groovy:groovy:4.0.24-SNAPSHOT.
      > Could not get resource 'https://repo.grails.org/grails/core/org/apache/groovy/groovy/4.0.24-SNAPSHOT/groovy-4.0.24-SNAPSHOT.pom'.
         > Could not GET 'https://repo.grails.org/grails/core/org/apache/groovy/groovy/4.0.24-SNAPSHOT/groovy-4.0.24-SNAPSHOT.pom'.
            > Read timed out
> Could not resolve org.grails:grails-datastore-core:9.0.0-SNAPSHOT.
  Required by:
      project :buildSrc > org.grails:grails-bom:7.0.0-SNAPSHOT:20241024.195419-118
      project :buildSrc > org.grails.plugins:hibernate5:9.0.0-SNAPSHOT:20241026.013223-22 > org.grails:grails-datastore-web:9.0.0-SNAPSHOT:20241025.200433-19
   > Skipped due to earlier error
> Could not resolve org.grails:grails-datastore-gorm:9.0.0-SNAPSHOT.
  Required by:
      project :buildSrc > org.grails:grails-bom:7.0.0-SNAPSHOT:20241024.195419-118
      project :buildSrc > org.grails.plugins:hibernate5:9.0.0-SNAPSHOT:20241026.013223-22 > org.grails:grails-datastore-gorm-support:9.0.0-SNAPSHOT:20241025.200433-19
      project :buildSrc > org.grails.plugins:hibernate5:9.0.0-SNAPSHOT:20241026.013223-22 > org.grails:grails-datastore-gorm-hibernate5:9.0.0-SNAPSHOT:20241026.013223-23
   > Skipped due to earlier error
> Could not resolve org.grails:grails-core:7.0.0-SNAPSHOT.
  Required by:
      project :buildSrc > org.grails:grails-bom:7.0.0-SNAPSHOT:20241024.195419-118
      project :buildSrc > org.grails.plugins:hibernate5:9.0.0-SNAPSHOT:20241026.013223-22 > org.grails:grails-datastore-gorm-support:9.0.0-SNAPSHOT:20241025.200433-19
   > Skipped due to earlier error
> Could not resolve org.apache.groovy:groovy:4.0.24-SNAPSHOT.
  Required by:
      project :buildSrc > org.grails.plugins:hibernate5:9.0.0-SNAPSHOT:20241026.013223-22
      project :buildSrc > org.grails.plugins:hibernate5:9.0.0-SNAPSHOT:20241026.013223-22 > org.grails:grails-datastore-web:9.0.0-SNAPSHOT:20241025.200433-19
      project :buildSrc > org.grails.plugins:hibernate5:9.0.0-SNAPSHOT:20241026.013223-22 > org.grails:grails-datastore-gorm-support:9.0.0-SNAPSHOT:20241025.200433-19
      project :buildSrc > org.grails.plugins:hibernate5:9.0.0-SNAPSHOT:20241026.013223-22 > org.grails:grails-datastore-gorm-hibernate5:9.0.0-SNAPSHOT:20241026.013223-23
   > Could not resolve org.apache.groovy:groovy:4.0.24-SNAPSHOT.
      > Could not get resource 'https://repo.grails.org/grails/core/org/apache/groovy/groovy/4.0.24-SNAPSHOT/groovy-4.0.24-SNAPSHOT.pom'.
         > Could not GET 'https://repo.grails.org/grails/core/org/apache/groovy/groovy/4.0.24-SNAPSHOT/groovy-4.0.24-SNAPSHOT.pom'.
            > Read timed out

* 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 2m 24s
1 actionable task: 1 up-to-date

@matrei matrei requested a review from jamesfredley October 28, 2024 13:23
@@ -47,7 +47,7 @@ class CommandSpec extends Specification {
Process executeGradleCommand(String command) {
StringBuilder gradleCommand = new StringBuilder()
if (spock.util.environment.OperatingSystem.current.isWindows()) {
gradleCommand.append("gradlew.bat")
gradleCommand.append("cmd.exe /c gradlew")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for finding this solution!

@jamesfredley
Copy link
Contributor

geb-with-testcontainers should allow Gradle to go back to 8.10.2.

geb-with-webdriver-binaries will be stuck at 8.6, for now.

After switching to `ContainerGebSpec`, it is no longer necessary to have the integration tests disabled.

Related: #385
@matrei matrei merged commit d3555ce into 7.0.x Oct 28, 2024
11 checks passed
@matrei matrei deleted the matrei/optional-webdriver-binaries branch October 28, 2024 15:03
@matrei
Copy link
Contributor Author

matrei commented Oct 28, 2024

geb-with-testcontainers should allow Gradle to go back to 8.10.2.

geb-with-webdriver-binaries will be stuck at 8.6, for now.

@jamesfredley Is it possible to differentiate the gradle version based on selected features?
Do you think we should update to Gradle 8.10.2 even though the optional geb-with-webdriver-binaries won't work without manually downgrading created apps?

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

Successfully merging this pull request may close these issues.

4 participants