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

[bugfix][jaxrs]: fix compile error for jaxrs samples #17479

Merged
merged 1 commit into from
Jan 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ import java.util.List;

import java.io.InputStream;

{{#useBeanValidation}}
import {{javaxPackage}}.validation.constraints.*;
import {{javaxPackage}}.validation.Valid;
{{/useBeanValidation}}

import {{javaxPackage}}.ws.rs.core.Response;
import {{javaxPackage}}.ws.rs.core.SecurityContext;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ import java.util.List;

import java.io.InputStream;

{{#useBeanValidation}}
import {{javaxPackage}}.validation.constraints.*;
import {{javaxPackage}}.validation.Valid;
{{/useBeanValidation}}

import {{javaxPackage}}.enterprise.context.RequestScoped;
import {{javaxPackage}}.ws.rs.core.Response;
import {{javaxPackage}}.ws.rs.core.SecurityContext;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<version>7.0</version>
<version>8.0</version>
<scope>provided</scope>
</dependency>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,14 @@
<artifactId>swagger-jaxrs</artifactId>
<scope>compile</scope>
<version>${swagger-core-version}</version>
<!-- excluded validation-api:1.1.0.Final due to fact that it doesn't support TYPE_USE,
for this project used jakarta.validation-api -->
<exclusions>
<exclusion>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,12 @@
<groupId>javax.ws.rs</groupId>
<artifactId>jsr311-api</artifactId>
</exclusion>
<!-- excluded validation-api:1.1.0.Final due to fact that it doesn't support TYPE_USE,
for this project used jakarta.validation-api -->
<exclusion>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,14 @@
<artifactId>swagger-jaxrs</artifactId>
<scope>compile</scope>
<version>${swagger-core-version}</version>
<!-- excluded validation-api:1.1.0.Final due to fact that it doesn't support TYPE_USE,
for this project used jakarta.validation-api -->
<exclusions>
<exclusion>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,14 @@
<artifactId>swagger-jaxrs</artifactId>
<scope>compile</scope>
<version>${swagger-core-version}</version>
<!-- excluded validation-api:1.1.0.Final due to fact that it doesn't support TYPE_USE,
for this project used jakarta.validation-api -->
<exclusions>
<exclusion>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,14 @@
<artifactId>swagger-jersey2-jaxrs</artifactId>
<scope>compile</scope>
<version>${swagger-core-version}</version>
<!-- excluded validation-api:1.1.0.Final due to fact that it doesn't support TYPE_USE,
for this project used jakarta.validation-api -->
<exclusions>
<exclusion>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ import {{package}}.NotFoundException;

import java.io.InputStream;

{{#useBeanValidation}}
import {{javaxPackage}}.validation.constraints.*;
import {{javaxPackage}}.validation.Valid;
{{/useBeanValidation}}
import {{javaxPackage}}.ws.rs.core.Response;
import {{javaxPackage}}.ws.rs.core.SecurityContext;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ repositories {
dependencies {
providedCompile 'org.jboss.resteasy:resteasy-jaxrs:3.0.11.Final'
providedCompile 'org.jboss.resteasy:jaxrs-api:3.0.11.Final'
providedCompile 'org.jboss.resteasy:resteasy-validator-provider-11:3.0.11.Final'
providedCompile('org.jboss.resteasy:resteasy-validator-provider-11:3.0.11.Final') {
exclude group: "javax.validation", module: "validation-api"
}
providedCompile 'org.jboss.resteasy:resteasy-multipart-provider:3.0.11.Final'
providedCompile 'jakarta.annotation:jakarta.annotation-api:1.3.5'
providedCompile 'org.jboss.spec.javax.servlet:jboss-servlet-api_3.0_spec:1.0.0.Final'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,14 @@
<artifactId>resteasy-validator-provider-11</artifactId>
<version>${resteasy-version}</version>
<scope>provided</scope>
<!-- excluded validation-api:1.1.0.Final due to fact that it doesn't support TYPE_USE,
for this project used jakarta.validation-api -->
<exclusions>
<exclusion>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.jboss.resteasy</groupId>
Expand All @@ -120,6 +128,14 @@
<groupId>io.swagger</groupId>
<artifactId>swagger-jaxrs</artifactId>
<version>${swagger-core-version}</version>
<!-- excluded validation-api:1.1.0.Final due to fact that it doesn't support TYPE_USE,
for this project used jakarta.validation-api -->
<exclusions>
<exclusion>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>junit</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@ repositories {
dependencies {
providedCompile 'org.jboss.resteasy:resteasy-jaxrs:3.0.11.Final'
providedCompile 'org.jboss.resteasy:jaxrs-api:3.0.11.Final'
providedCompile 'org.jboss.resteasy:resteasy-validator-provider-11:3.0.11.Final'
providedCompile('org.jboss.resteasy:resteasy-validator-provider-11:3.0.11.Final') {
exclude group: "javax.validation", module: "validation-api"
}
providedCompile 'org.jboss.resteasy:resteasy-multipart-provider:3.0.11.Final'
providedCompile 'jakarta.annotation:jakarta.annotation-api:1.3.5'
providedCompile 'javax:javaee-api:7.0'
providedCompile 'javax:javaee-api:8.0'
providedCompile 'org.jboss.spec.javax.servlet:jboss-servlet-api_3.0_spec:1.0.0.Final'
compile 'io.swagger:swagger-annotations:1.5.22'
compile 'org.jboss.resteasy:resteasy-jackson2-provider:3.0.11.Final'
Expand All @@ -23,7 +25,9 @@ dependencies {
compile 'com.fasterxml.jackson.datatype:jackson-datatype-joda:2.9.9'
compile 'joda-time:joda-time:2.7'
//TODO: swaggerFeature
compile 'io.swagger:swagger-jaxrs:1.5.12'
compile('io.swagger:swagger-jaxrs:1.5.12') {
exclude group: "javax.validation", module: "validation-api"
}

testCompile 'junit:junit:4.13.2',
'org.hamcrest:hamcrest-core:1.3'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<version>7.0</version>
<version>8.0</version>
<scope>provided</scope>
</dependency>

Expand Down Expand Up @@ -114,6 +114,14 @@
<artifactId>resteasy-validator-provider-11</artifactId>
<version>3.6.3.SP1</version>
<scope>provided</scope>
<!-- excluded validation-api:1.1.0.Final due to fact that it doesn't support TYPE_USE,
for this project used jakarta.validation-api -->
<exclusions>
<exclusion>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.jboss.resteasy</groupId>
Expand Down Expand Up @@ -142,6 +150,14 @@
<groupId>io.swagger</groupId>
<artifactId>swagger-jaxrs</artifactId>
<version>${swagger-core-version}</version>
<!-- excluded validation-api:1.1.0.Final due to fact that it doesn't support TYPE_USE,
for this project used jakarta.validation-api -->
<exclusions>
<exclusion>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>junit</groupId>
Expand Down
8 changes: 8 additions & 0 deletions samples/client/petstore/jaxrs-cxf-client-jackson/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,14 @@
<artifactId>swagger-jaxrs</artifactId>
<scope>compile</scope>
<version>${swagger-core-version}</version>
<!-- excluded validation-api:1.1.0.Final due to fact that it doesn't support TYPE_USE,
for this project used jakarta.validation-api -->
<exclusions>
<exclusion>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
Expand Down
8 changes: 8 additions & 0 deletions samples/client/petstore/jaxrs-cxf-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,14 @@
<artifactId>swagger-jaxrs</artifactId>
<scope>compile</scope>
<version>${swagger-core-version}</version>
<!-- excluded validation-api:1.1.0.Final due to fact that it doesn't support TYPE_USE,
for this project used jakarta.validation-api -->
<exclusions>
<exclusion>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
Expand Down
8 changes: 8 additions & 0 deletions samples/server/petstore/jaxrs-cxf-annotated-base-path/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,14 @@
<artifactId>swagger-jaxrs</artifactId>
<scope>compile</scope>
<version>${swagger-core-version}</version>
<!-- excluded validation-api:1.1.0.Final due to fact that it doesn't support TYPE_USE,
for this project used jakarta.validation-api -->
<exclusions>
<exclusion>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
Expand Down
2 changes: 1 addition & 1 deletion samples/server/petstore/jaxrs-cxf-cdi/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<version>7.0</version>
<version>8.0</version>
<scope>provided</scope>
</dependency>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@

import java.io.InputStream;

import javax.validation.constraints.*;
import javax.validation.Valid;

import javax.ws.rs.core.Response;
import javax.ws.rs.core.SecurityContext;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@

import java.io.InputStream;

import javax.validation.constraints.*;
import javax.validation.Valid;

import javax.ws.rs.core.Response;
import javax.ws.rs.core.SecurityContext;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@

import java.io.InputStream;

import javax.validation.constraints.*;
import javax.validation.Valid;

import javax.ws.rs.core.Response;
import javax.ws.rs.core.SecurityContext;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@

import java.io.InputStream;

import javax.validation.constraints.*;
import javax.validation.Valid;

import javax.ws.rs.core.Response;
import javax.ws.rs.core.SecurityContext;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@

import java.io.InputStream;

import javax.validation.constraints.*;
import javax.validation.Valid;

import javax.enterprise.context.RequestScoped;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.SecurityContext;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@

import java.io.InputStream;

import javax.validation.constraints.*;
import javax.validation.Valid;

import javax.enterprise.context.RequestScoped;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.SecurityContext;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@

import java.io.InputStream;

import javax.validation.constraints.*;
import javax.validation.Valid;

import javax.enterprise.context.RequestScoped;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.SecurityContext;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@

import java.io.InputStream;

import javax.validation.constraints.*;
import javax.validation.Valid;

import javax.enterprise.context.RequestScoped;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.SecurityContext;
Expand Down
8 changes: 8 additions & 0 deletions samples/server/petstore/jaxrs-cxf-non-spring-app/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,14 @@
<artifactId>swagger-jaxrs</artifactId>
<scope>compile</scope>
<version>${swagger-core-version}</version>
<!-- excluded validation-api:1.1.0.Final due to fact that it doesn't support TYPE_USE,
for this project used jakarta.validation-api -->
<exclusions>
<exclusion>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
Expand Down
6 changes: 6 additions & 0 deletions samples/server/petstore/jaxrs-cxf-test-data/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,12 @@
<groupId>javax.ws.rs</groupId>
<artifactId>jsr311-api</artifactId>
</exclusion>
<!-- excluded validation-api:1.1.0.Final due to fact that it doesn't support TYPE_USE,
for this project used jakarta.validation-api -->
<exclusion>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
Expand Down
8 changes: 8 additions & 0 deletions samples/server/petstore/jaxrs-cxf/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,14 @@
<artifactId>swagger-jaxrs</artifactId>
<scope>compile</scope>
<version>${swagger-core-version}</version>
<!-- excluded validation-api:1.1.0.Final due to fact that it doesn't support TYPE_USE,
for this project used jakarta.validation-api -->
<exclusions>
<exclusion>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
Expand Down
Loading
Loading