REST Assured 4.5 contains the changes that we need to support it with Jakarta EE 9.

Comment From: wilkinsona

Unfortunately REST Assured 4.5 doesn't work with Groovy 4.0 so we need to revert its reinstatement.

@johanhaleby please let us know if there's anything we can do to help. I'm more than happy to test snapshots or local builds of REST Assured, for example.

Comment From: johanhaleby

@wilkinsona I'll have a look!

Comment From: johanhaleby

@wilkinsona Trying to port it now but I run into a lot of issues. I think some errors has to do with the groovy compiler, unfortunately, so I'm porting several files to Java. But some files are really difficult to port.

One thing that seem to have stopped working in Groovy is calls to super, for example:

protected Object parseResponse(HttpResponse resp, Object contentType) {
    ...
    return super.parseResponse(resp, contentType);
}

The super method has the exact same declaration (both a written in groovy). But I get e.g. this error when running tests that use this method (compilation works fine).

No signature of method: io.restassured.internal.http.HTTPBuilder.parseResponse() is applicable for argument types: (io.restassured.internal.http.HttpResponseDecorator, io.restassured.http.ContentType) values: [io.restassured.internal.http.HttpResponseDecorator@2cb3d0f7, ...]

I don't suppose you have any insight into this? :)

Comment From: wilkinsona

I'm afraid not, sorry, but I'm far from being a Groovy expert. The only insight that I can provide is to note that that's the same error I saw when running REST Docs' tests using REST Assured 4.5 and Groovy 4.0.1.

I'm porting several files to Java. But some files are really difficult to port.

FWIW, I think this will pay dividends in the long run. Our experience has been that compatibility is easiest when writing general-purpose code in Java and pushing the use of Groovy and Kotlin out to the edges where it's only used to provide Groovy- or Kotlin-specific features.

Comment From: johanhaleby

@wilkinsona Yes I want to push groovy to the edge, but it'll require a lot of time which unfortunately I don't have. But I think I've managed to push a working snapshot (not sure if OSGi is working yet though since the osgi tests fail, but I'm not sure if it's the tests or the implementation that is to blame).

Please try version 5.0.0-SNAPSHOT after having added the following Maven repository:

<repositories>
        <repository>
            <id>sonatype</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
            <snapshots />
        </repository>
</repositories>

Comment From: wilkinsona

Thanks very much for the 5.0 snapshot, @johanhaleby. REST Docs builds cleanly against it and only depends on Groovy 4.0.x so it'll work for Boot's purposes too.

Comment From: johanhaleby

Great, then I'll release it soon! :)

Comment From: wilkinsona

@johanhaleby Thanks very much for the 5.0.0 release.

Comment From: johanhaleby

@wilkinsona You're welcome :) Thanks for the heads up, and let me know if something is not working :)