Skip to content

Commit

Permalink
Merge pull request #21835 from vespa-engine/remove-jersey-media-bundl…
Browse files Browse the repository at this point in the history
…es_2

Remove jersey media bundles 2 [run-systemtest]
  • Loading branch information
gjoranv authored Mar 27, 2022
2 parents 622f4a6 + 1bdf88f commit d244628
Show file tree
Hide file tree
Showing 8 changed files with 62 additions and 39 deletions.
5 changes: 0 additions & 5 deletions cloud-tenant-base-dependencies-enforcer/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
<javax.validation-api.version>1.1.0.Final</javax.validation-api.version>
<javax.ws.rs-api.version>2.0.1</javax.ws.rs-api.version>
<jersey2.version>2.25</jersey2.version>
<mimepull.version>1.9.6</mimepull.version>
</properties>

<build>
Expand Down Expand Up @@ -123,13 +122,9 @@
<include>org.glassfish.jersey.core:jersey-client:[${jersey2.version}]:jar:provided</include>
<include>org.glassfish.jersey.core:jersey-common:[${jersey2.version}]:jar:provided</include>
<include>org.glassfish.jersey.core:jersey-server:[${jersey2.version}]:jar:provided</include>
<include>org.glassfish.jersey.ext:jersey-entity-filtering:[${jersey2.version}]:jar:provided</include>
<include>org.glassfish.jersey.ext:jersey-proxy-client:[${jersey2.version}]:jar:provided</include>
<include>org.glassfish.jersey.media:jersey-media-json-jackson:[${jersey2.version}]:jar:provided</include>
<include>org.glassfish.jersey.media:jersey-media-multipart:[${jersey2.version}]:jar:provided</include>
<include>org.javassist:javassist:[${javassist.version}]:jar:provided</include>
<include>org.json:json:[${org.json.version}]:jar:provided</include>
<include>org.jvnet.mimepull:mimepull:[${mimepull.version}]:jar:provided</include>
<include>org.slf4j:jcl-over-slf4j:[${slf4j.version}]:jar:provided</include>
<include>org.slf4j:log4j-over-slf4j:[${slf4j.version}]:jar:provided</include>
<include>org.slf4j:slf4j-api:[${slf4j.version}]:jar:provided</include>
Expand Down
39 changes: 39 additions & 0 deletions configserver/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -193,11 +193,39 @@
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<!-- Do not remove, as long as this is provided by jdisc and configserver uses jersey-client -->
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<!-- Do not remove, as long as this is provided by jdisc and configserver uses jersey-client -->
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.jaxrs</groupId>
<artifactId>jackson-jaxrs-json-provider</artifactId>
<exclusions>
<exclusion>
<!-- Conflicts with javax.activation:javax.activation-api:1.2.0, which is "exported" via jdisc_core. -->
<groupId>jakarta.activation</groupId>
<artifactId>jakarta.activation-api</artifactId>
</exclusion>
<exclusion>
<!-- Conflicts with javax.xml.bind:jaxb-api:2.3, which is "exported" via jdisc_core.-->
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-compress</artifactId>
Expand Down Expand Up @@ -245,6 +273,17 @@
<dependency>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-json-jackson</artifactId>
<exclusions>
<!-- Prevent embedding deps provided by jdisc -->
<exclusion>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
</exclusion>
<exclusion>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<!-- Not needed by configserver, but by controller. Also pulls in mimepull. -->
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.serviceview;

import com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider;
import com.google.inject.Inject;
import com.yahoo.cloud.config.ConfigserverConfig;
import com.yahoo.container.jdisc.ThreadedHttpRequestHandler;
Expand Down Expand Up @@ -41,6 +42,7 @@ public class StateRequestHandler extends RestApiRequestHandler<StateRequestHandl
.newBuilder()
.property(ClientProperties.CONNECT_TIMEOUT, 10000)
.property(ClientProperties.READ_TIMEOUT, 10000)
.register(JacksonJsonProvider.class)
.register((ClientRequestFilter) ctx -> ctx.getHeaders().put(HttpHeaders.USER_AGENT, List.of(USER_AGENT)))
.build();

Expand Down
4 changes: 0 additions & 4 deletions container-dependencies-enforcer/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,9 @@
<include>org.glassfish.jersey.core:jersey-client:[${jersey2.version}]:jar:provided</include>
<include>org.glassfish.jersey.core:jersey-common:[${jersey2.version}]:jar:provided</include>
<include>org.glassfish.jersey.core:jersey-server:[${jersey2.version}]:jar:provided</include>
<include>org.glassfish.jersey.ext:jersey-entity-filtering:[${jersey2.version}]:jar:provided</include>
<include>org.glassfish.jersey.ext:jersey-proxy-client:[${jersey2.version}]:jar:provided</include>
<include>org.glassfish.jersey.media:jersey-media-json-jackson:[${jersey2.version}]:jar:provided</include>
<include>org.glassfish.jersey.media:jersey-media-multipart:[${jersey2.version}]:jar:provided</include>
<include>org.javassist:javassist:[${javassist.version}]:jar:provided</include>
<include>org.json:json:[${org.json.version}]:jar:provided</include>
<include>org.jvnet.mimepull:mimepull:[${mimepull.version}]:jar:provided</include>
<include>org.slf4j:jcl-over-slf4j:[${slf4j.version}]:jar:provided</include>
<include>org.slf4j:log4j-over-slf4j:[${slf4j.version}]:jar:provided</include>
<include>org.slf4j:slf4j-api:[${slf4j.version}]:jar:provided</include>
Expand Down
4 changes: 2 additions & 2 deletions container-dependency-versions/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -298,9 +298,10 @@
<version>${org.json.version}</version>
</dependency>
<dependency>
<!-- TODO Vespa 8: remove! No longer installed in jdisc -->
<groupId>org.jvnet.mimepull</groupId>
<artifactId>mimepull</artifactId>
<version>${mimepull.version}</version>
<version>1.9.6</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
Expand Down Expand Up @@ -431,7 +432,6 @@
<javax.validation-api.version>1.1.0.Final</javax.validation-api.version>
<javax.ws.rs-api.version>2.0.1</javax.ws.rs-api.version>
<jersey2.version>2.25</jersey2.version>
<mimepull.version>1.9.6</mimepull.version>

<!-- Not a dependency. Only included to allow the versions-maven-plugin to check for updates of itself -->
<versions-maven-plugin.version>2.8.1</versions-maven-plugin.version>
Expand Down
4 changes: 0 additions & 4 deletions container-disc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -252,11 +252,7 @@
javax.ws.rs-api-${javax.ws.rs-api.version}.jar,
jersey-client-${jersey2.version}.jar,
jersey-common-${jersey2.version}.jar,
jersey-entity-filtering-${jersey2.version}.jar, <!-- needed by jersey-media-json-jackson -->
jersey-guava-${jersey2.version}.jar,
jersey-media-json-jackson-${jersey2.version}.jar,
jersey-media-multipart-${jersey2.version}.jar,
mimepull-${mimepull.version}.jar, <!-- needed by media-multipart -->
jersey-server-${jersey2.version}.jar,
jersey-proxy-client-${jersey2.version}.jar,
osgi-resource-locator-1.0.1.jar,
Expand Down
1 change: 0 additions & 1 deletion dist/vespa.spec
Original file line number Diff line number Diff line change
Expand Up @@ -899,7 +899,6 @@ fi
%{_prefix}/lib/jars/alpn-*.jar
%{_prefix}/lib/jars/http2-*.jar
%{_prefix}/lib/jars/jetty-*.jar
%{_prefix}/lib/jars/mimepull-*.jar
%{_prefix}/lib/jars/model-evaluation-jar-with-dependencies.jar
%{_prefix}/lib/jars/model-integration-jar-with-dependencies.jar
%{_prefix}/lib/jars/org.apache.aries.spifly.dynamic.bundle-*.jar
Expand Down
42 changes: 19 additions & 23 deletions vespa_jersey2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,6 @@
<groupId>javax.ws.rs</groupId>
<artifactId>javax.ws.rs-api</artifactId>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-json-jackson</artifactId>
<exclusions>
<exclusion>
<!-- Conflicts with javax.activation:javax.activation-api:1.2.0, which is "exported" via jdisc_core. -->
<groupId>jakarta.activation</groupId>
<artifactId>jakarta.activation-api</artifactId>
</exclusion>
<exclusion>
<!-- Conflicts with javax.xml.bind:jaxb-api:2.3, which is "exported" via jdisc_core.-->
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-multipart</artifactId>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.ext</groupId>
<artifactId>jersey-proxy-client</artifactId>
Expand All @@ -57,9 +37,7 @@
</dependency>

<dependency>
<!-- Previously pulled in by jersey-container-servlet-core. Contains packages imported by
jersey-entity-filtering, which is used by jersey-media-json-jackson, which is used by hosted Vespa
framework bundles, July 2021. -->
<!-- TODO Vespa 8: Remove, contains packages imported by only one user app (March 2022) -->
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-server</artifactId>
<exclusions>
Expand All @@ -76,6 +54,24 @@
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
</dependency>

<dependency>
<!-- TODO: try to remove! Previously pulled in by jersey-media-json-jackson. -->
<groupId>com.fasterxml.jackson.jaxrs</groupId>
<artifactId>jackson-jaxrs-json-provider</artifactId>
<exclusions>
<exclusion>
<!-- Conflicts with javax.activation:javax.activation-api:1.2.0, which is "exported" via jdisc_core. -->
<groupId>jakarta.activation</groupId>
<artifactId>jakarta.activation-api</artifactId>
</exclusion>
<exclusion>
<!-- Conflicts with javax.xml.bind:jaxb-api:2.3, which is "exported" via jdisc_core.-->
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>

<build>
Expand Down

0 comments on commit d244628

Please sign in to comment.