Skip to content

Commit

Permalink
remove dependency to validation
Browse files Browse the repository at this point in the history
This PR removes validation as a dependency of http-server-tck and http-tck

It updates to 6.3.4

the task gralde task preRelease is now successful

We need micronaut-projects/micronaut-validation#63 to enable validation of external class such as POJO in the test tck without depending on validation.

I have disabled one test because of that.
  • Loading branch information
sdelamo authored and graemerocher committed Mar 11, 2023
1 parent 0992ee7 commit 6608341
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 22 deletions.
3 changes: 3 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ systemlambda = "1.2.1"
testcontainers = "1.17.5"
vertx = "3.9.13"
wiremock = "2.33.2"
javax-validation-api = "2.0.1.Final"

#
# Versions which start with managed- are managed by Micronaut in the sense
Expand Down Expand Up @@ -262,5 +263,7 @@ httpcomponents-mime = { module = "org.apache.httpcomponents:httpmime", version.r

wiremock = { module = "com.github.tomakehurst:wiremock-jre8", version.ref = "wiremock" }

javax-validation-api = { module = "javax.validation:validation-api", version.ref = "javax-validation-api" }

[bundles]
asm = ["asm", "asm-commons"]
11 changes: 1 addition & 10 deletions http-server-tck/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,11 @@ plugins {
}
dependencies {
annotationProcessor(projects.injectJava)

annotationProcessor(platform(libs.test.boms.micronaut.validation))
annotationProcessor(libs.micronaut.validation.processor) {
exclude(group = "io.micronaut")
}
annotationProcessor(projects.httpValidation)

implementation(platform(libs.test.boms.micronaut.validation))
implementation(libs.micronaut.validation) {
exclude(group = "io.micronaut")
}
implementation(projects.runtime)
implementation(projects.jacksonDatabind)
implementation(projects.inject)
implementation(libs.javax.validation.api)

api(projects.httpTck)
api(projects.httpServer)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
import io.micronaut.http.tck.ServerUnderTest;
import io.micronaut.http.tck.ServerUnderTestProviderUtils;
import jakarta.inject.Singleton;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;

import jakarta.validation.Valid;
Expand Down Expand Up @@ -191,6 +192,7 @@ void corsHeadersArePresentAfterExceptions() throws IOException {
.build()));
}

@Disabled("/to avoid a circular dependency to validation. https://github.com/micronaut-projects/micronaut-validation/issues/63")
@Test
void messageValidationErrorsReturn400() throws IOException {
asserts(SPEC_NAME,
Expand Down
9 changes: 0 additions & 9 deletions http-tck/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,7 @@ plugins {
}
dependencies {
annotationProcessor(projects.injectJava)
annotationProcessor(platform(libs.test.boms.micronaut.validation))
annotationProcessor(libs.micronaut.validation.processor) {
exclude(group = "io.micronaut")
}
annotationProcessor(projects.httpValidation)

implementation(platform(libs.test.boms.micronaut.validation))
implementation(libs.micronaut.validation) {
exclude(group = "io.micronaut")
}
implementation(projects.runtime)
implementation(projects.jacksonDatabind)
implementation(projects.inject)
Expand Down
4 changes: 4 additions & 0 deletions test-suite-http-server-tck-jdk/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ dependencies {
testImplementation(projects.httpClientJdk)
testImplementation(projects.httpServerTck)
testImplementation(libs.junit.platform.engine)
testImplementation(platform(libs.test.boms.micronaut.validation))
testImplementation(libs.micronaut.validation) {
exclude(mapOf("group" to "io.micronaut"))
}
}

tasks.withType(Test::class) {
Expand Down
6 changes: 3 additions & 3 deletions test-suite-http-server-tck-netty/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ micronautBuild {
}

dependencies {
implementation(projects.httpServerTck)
testImplementation(projects.httpServerTck)
testImplementation(projects.httpServerNetty)
testImplementation(projects.httpClient)
testImplementation(libs.junit.platform.engine)
testImplementation(libs.managed.logback.classic)
implementation platform(libs.test.boms.micronaut.validation)
implementation(libs.micronaut.validation) {
testImplementation platform(libs.test.boms.micronaut.validation)
testImplementation(libs.micronaut.validation) {
exclude group: 'io.micronaut'
}

Expand Down

0 comments on commit 6608341

Please sign in to comment.