Skip to content

Commit

Permalink
Jetty 12 add duplicate classes finder plugin to avoid sames classes w…
Browse files Browse the repository at this point in the history
…ith different content coming from different jars (#10767)

* add duplicate finder plugin

---------

Signed-off-by: Olivier Lamy <olamy@apache.org>
  • Loading branch information
olamy authored Nov 7, 2023
1 parent 3fa3e8a commit b889082
Show file tree
Hide file tree
Showing 25 changed files with 320 additions and 51 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.server.Session;
import org.eclipse.jetty.util.Callback;
import org.junit.Assert;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
Expand All @@ -39,6 +38,7 @@
import static org.hamcrest.Matchers.not;
import static org.hamcrest.Matchers.nullValue;
import static org.hamcrest.Matchers.startsWith;
import static org.junit.jupiter.api.Assertions.assertNull;

/**
* SessionHandlerTest
Expand Down Expand Up @@ -656,7 +656,7 @@ public void testUriParameterOnly() throws Exception
response = HttpTester.parseResponse(endPoint.getResponse());
assertThat(response.getStatus(), equalTo(200));

Assert.assertNull(response.get(HttpHeader.SET_COOKIE));
assertNull(response.get(HttpHeader.SET_COOKIE));

String content = response.getContent();
assertThat(content, startsWith("Session="));
Expand Down
10 changes: 10 additions & 0 deletions jetty-core/jetty-websocket/jetty-websocket-core-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,16 @@
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</exclusion>
<exclusion>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
Expand Down
5 changes: 0 additions & 5 deletions jetty-ee10/jetty-ee10-maven-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,6 @@
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-tools-api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.maven.shared</groupId>
<artifactId>maven-artifact-transfer</artifactId>
<version>${maven-artifact-transfer.version}</version>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-xml</artifactId>
Expand Down
8 changes: 8 additions & 0 deletions jetty-ee10/jetty-ee10-osgi/test-jetty-ee10-osgi/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
<properties>
<assembly-directory>target/distribution</assembly-directory>
<bundle-symbolic-name>${project.groupId}.boot.test.osgi</bundle-symbolic-name>
<!-- too many duplicates with osgi jars... -->
<duplicate-finder.skip>true</duplicate-finder.skip>
<maven.deploy.skip>true</maven.deploy.skip>
<maven.javadoc.skip>true</maven.javadoc.skip>
</properties>
Expand Down Expand Up @@ -415,6 +417,12 @@
<groupId>org.ops4j.pax.exam</groupId>
<artifactId>pax-exam-junit4</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.ops4j.pax.exam</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,6 @@
<dependency>
<groupId>org.eclipse.jetty.tests</groupId>
<artifactId>jetty-test-session-common</artifactId>
<exclusions>
<exclusion>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.toolchain</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,17 +76,17 @@
<groupId>org.infinispan</groupId>
<artifactId>infinispan-client-hotrod</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.wildfly.security</groupId>
<artifactId>wildfly-elytron</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.infinispan</groupId>
<artifactId>infinispan-core</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.wildfly.common</groupId>
<artifactId>wildfly-common</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.infinispan</groupId>
Expand Down Expand Up @@ -128,6 +128,41 @@
<artifactId>testcontainers</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.wildfly.security</groupId>
<artifactId>wildfly-elytron-sasl-digest</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.wildfly.security</groupId>
<artifactId>wildfly-elytron-sasl-external</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.wildfly.security</groupId>
<artifactId>wildfly-elytron-sasl-gs2</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.wildfly.security</groupId>
<artifactId>wildfly-elytron-sasl-gssapi</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.wildfly.security</groupId>
<artifactId>wildfly-elytron-sasl-oauth2</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.wildfly.security</groupId>
<artifactId>wildfly-elytron-sasl-plain</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.wildfly.security</groupId>
<artifactId>wildfly-elytron-sasl-scram</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
Expand Down
4 changes: 4 additions & 0 deletions jetty-ee8/jetty-ee8-glassfish-jstl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@
<groupId>javax.servlet.jsp</groupId>
<artifactId>*</artifactId>
</exclusion>
<exclusion>
<groupId>javax.servlet.jsp.jstl</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>

Expand Down
5 changes: 0 additions & 5 deletions jetty-ee8/jetty-ee8-maven-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,6 @@
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-tools-api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.maven.shared</groupId>
<artifactId>maven-artifact-transfer</artifactId>
<version>${maven-artifact-transfer.version}</version>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-xml</artifactId>
Expand Down
2 changes: 2 additions & 0 deletions jetty-ee8/jetty-ee8-osgi/test-jetty-ee8-osgi/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
<assembly-directory>target/distribution</assembly-directory>
<bundle-symbolic-name>${project.groupId}.boot.test.osgi</bundle-symbolic-name>
<bundle.debug>true</bundle.debug>
<!-- too many duplicates with osgi jars... -->
<duplicate-finder.skip>true</duplicate-finder.skip>
<ee9.module>jetty-ee9-osgi/test-jetty-ee9-osgi</ee9.module>
<el.artifactId>apache-el</el.artifactId>
<el.groupId>org.mortbay.jasper</el.groupId>
Expand Down
15 changes: 6 additions & 9 deletions jetty-ee9/jetty-ee9-demos/jetty-ee9-demo-embedded/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@
<dependency>
<groupId>org.eclipse.jetty.ee9</groupId>
<artifactId>jetty-ee9-plus</artifactId>
<exclusions>
<exclusion>
<groupId>jakarta.el</groupId>
<artifactId>jakarta.el-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.ee9</groupId>
Expand All @@ -85,15 +91,6 @@
<version>${project.version}</version>
<type>war</type>
</dependency>
<!-- sounds cyclic -->
<!--
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-home</artifactId>
<type>zip</type>
<scope>test</scope>
</dependency>
-->
<dependency>
<groupId>org.eclipse.jetty.ee9.demos</groupId>
<artifactId>jetty-ee9-demo-jndi-webapp</artifactId>
Expand Down
18 changes: 18 additions & 0 deletions jetty-ee9/jetty-ee9-glassfish-jstl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,35 @@
<dependency>
<groupId>jakarta.servlet.jsp.jstl</groupId>
<artifactId>jakarta.servlet.jsp.jstl-api</artifactId>
<exclusions>
<exclusion>
<groupId>jakarta.el</groupId>
<artifactId>jakarta.el-api</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>org.glassfish.web</groupId>
<artifactId>jakarta.servlet.jsp.jstl</artifactId>
<exclusions>
<exclusion>
<groupId>jakarta.el</groupId>
<artifactId>jakarta.el-api</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>org.eclipse.jetty.ee9</groupId>
<artifactId>jetty-ee9-annotations</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>jakarta.el</groupId>
<artifactId>jakarta.el-api</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
Expand Down
11 changes: 6 additions & 5 deletions jetty-ee9/jetty-ee9-maven-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,6 @@
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-tools-api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.maven.shared</groupId>
<artifactId>maven-artifact-transfer</artifactId>
<version>${maven-artifact-transfer.version}</version>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-xml</artifactId>
Expand Down Expand Up @@ -114,6 +109,12 @@
<groupId>org.eclipse.jetty.ee9</groupId>
<artifactId>jetty-ee9-plus</artifactId>
<optional>true</optional>
<exclusions>
<exclusion>
<groupId>jakarta.el</groupId>
<artifactId>jakarta.el-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.ee9</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@
import org.apache.maven.artifact.repository.ArtifactRepository;
import org.apache.maven.execution.MavenSession;
import org.apache.maven.project.MavenProject;
import org.apache.maven.project.ProjectBuildingRequest;
import org.apache.maven.shared.transfer.artifact.DefaultArtifactCoordinate;
import org.apache.maven.shared.transfer.artifact.resolve.ArtifactResolver;
import org.apache.maven.shared.transfer.artifact.resolve.ArtifactResolverException;
import org.eclipse.aether.RepositorySystem;
import org.eclipse.aether.artifact.DefaultArtifact;
import org.eclipse.aether.resolution.ArtifactRequest;
Expand Down
6 changes: 6 additions & 0 deletions jetty-ee9/jetty-ee9-osgi/jetty-ee9-osgi-boot-jsp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@
<groupId>org.eclipse.jetty.ee9.osgi</groupId>
<artifactId>jetty-ee9-osgi-boot</artifactId>
<scope>provided</scope>
<exclusions>
<exclusion>
<groupId>jakarta.el</groupId>
<artifactId>jakarta.el-api</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>

Expand Down
2 changes: 2 additions & 0 deletions jetty-ee9/jetty-ee9-osgi/test-jetty-ee9-osgi/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
<properties>
<assembly-directory>target/distribution</assembly-directory>
<bundle-symbolic-name>${project.groupId}.boot.test.osgi</bundle-symbolic-name>
<!-- too many duplicates with osgi jars... -->
<duplicate-finder.skip>true</duplicate-finder.skip>
<injection.bundle.version>1.2</injection.bundle.version>
<jetty-orbit-url>https://download.eclipse.org/jetty/orbit/</jetty-orbit-url>
<maven.deploy.skip>true</maven.deploy.skip>
Expand Down
6 changes: 6 additions & 0 deletions jetty-ee9/jetty-ee9-runner/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@
<dependency>
<groupId>org.eclipse.jetty.ee9</groupId>
<artifactId>jetty-ee9-plus</artifactId>
<exclusions>
<exclusion>
<groupId>jakarta.el</groupId>
<artifactId>jakarta.el-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.ee9.websocket</groupId>
Expand Down
6 changes: 6 additions & 0 deletions jetty-ee9/jetty-ee9-tests/jetty-ee9-test-integration/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,12 @@
<groupId>org.eclipse.jetty.ee9</groupId>
<artifactId>jetty-ee9-annotations</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>jakarta.el</groupId>
<artifactId>jakarta.el-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.ee9</groupId>
Expand Down
12 changes: 12 additions & 0 deletions jetty-ee9/jetty-ee9-tests/jetty-ee9-test-quickstart/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@
<groupId>org.eclipse.jetty.ee9</groupId>
<artifactId>jetty-ee9-annotations</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>jakarta.el</groupId>
<artifactId>jakarta.el-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.ee9</groupId>
Expand All @@ -47,6 +53,12 @@
<groupId>org.eclipse.jetty.ee9</groupId>
<artifactId>jetty-ee9-plus</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>jakarta.el</groupId>
<artifactId>jakarta.el-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.ee9</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,6 @@
<dependency>
<groupId>org.eclipse.jetty.tests</groupId>
<artifactId>jetty-test-session-common</artifactId>
<exclusions>
<exclusion>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.toolchain</groupId>
Expand Down
Loading

0 comments on commit b889082

Please sign in to comment.