Skip to content

Commit

Permalink
GH-4408: Enforce no duplicate classes and (some) banned dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
erikgb committed Mar 5, 2023
1 parent e087c11 commit b27367f
Show file tree
Hide file tree
Showing 22 changed files with 208 additions and 180 deletions.
18 changes: 12 additions & 6 deletions compliance/elasticsearch/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,24 @@
<artifactId>lucene-test-framework</artifactId>
<version>${lucene.version}</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.elasticsearch.test</groupId>
<artifactId>framework</artifactId>
<version>${elasticsearch.version}</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
Expand All @@ -66,11 +78,6 @@
<artifactId>jcl-over-slf4j</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>log4j-over-slf4j</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.locationtech.jts</groupId>
<artifactId>jts-core</artifactId>
Expand All @@ -97,7 +104,6 @@
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.17.2</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
5 changes: 0 additions & 5 deletions compliance/lucene/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,6 @@
<artifactId>jcl-over-slf4j</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>log4j-over-slf4j</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
Expand Down
5 changes: 0 additions & 5 deletions compliance/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -146,11 +146,6 @@
<artifactId>assertj-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
Expand Down
7 changes: 2 additions & 5 deletions compliance/repository/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -70,19 +70,16 @@
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-server</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-webapp</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>log4j-over-slf4j</artifactId>
<artifactId>jcl-over-slf4j</artifactId>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
6 changes: 0 additions & 6 deletions compliance/rio/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,6 @@
<version>1.3.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
<version>${jaxb.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
Expand Down
10 changes: 3 additions & 7 deletions compliance/solr/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,16 @@
<artifactId>jcl-over-slf4j</artifactId>
<scope>test</scope>
</dependency>
<!-- solr-core pulls in log4j -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>log4j-over-slf4j</artifactId>
<scope>test</scope>
</dependency>
<!-- solr-core pulls in log4j2 -->
<dependency>
<!-- bridging component for log4j2 to slf4j -->
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-to-slf4j</artifactId>
<version>2.9.1</version>
<scope>test</scope>
</dependency>
<!-- needed for embedded solr server -->
Expand All @@ -64,11 +64,7 @@
<exclusions>
<exclusion>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
<artifactId>*</artifactId>
</exclusion>
<exclusion>
<groupId>jdk.tools</groupId>
Expand Down
7 changes: 2 additions & 5 deletions compliance/sparql/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -200,19 +200,16 @@
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-server</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-webapp</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>log4j-over-slf4j</artifactId>
<artifactId>jcl-over-slf4j</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
6 changes: 0 additions & 6 deletions core/queryresultio/text/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,6 @@
<dependency>
<groupId>com.opencsv</groupId>
<artifactId>opencsv</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
Expand Down
12 changes: 12 additions & 0 deletions core/rio/jsonld/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,23 @@
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient-cache</artifactId>
</dependency>
<!-- httpclient pulls in commons-logging -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
Expand Down
16 changes: 12 additions & 4 deletions core/sail/elasticsearch-store/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,18 @@
<version>${elasticsearch.version}</version>
<optional>true</optional>
<exclusions>
<exclusion>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</exclusion>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- org.elasticsearch.client:transport pulls in JCL -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
Expand All @@ -47,6 +49,12 @@
<artifactId>elasticsearch-cluster-runner</artifactId>
<version>${elasticsearch.version}.0</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
Expand Down
10 changes: 6 additions & 4 deletions core/sail/elasticsearch/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,17 @@
<version>${elasticsearch.version}</version>
<optional>true</optional>
<exclusions>
<exclusion>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</exclusion>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- org.elasticsearch.client:transport pulls in JCL -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
<scope>runtime</scope>
</dependency>
</dependencies>
</project>
35 changes: 17 additions & 18 deletions core/sail/solr/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
<artifactId>rdf4j-sail-solr</artifactId>
<name>RDF4J: Solr Sail Index</name>
<description>StackableSail implementation offering full-text search on literals, based on Solr.</description>
<properties>
<!-- FIXME: Support for embedded Solr server require non-provided Java EE dependencies -->
<enforce-javaee-provided.fail>false</enforce-javaee-provided.fail>
</properties>
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
Expand All @@ -26,11 +30,6 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
<version>${jaxb.version}</version>
</dependency>
<!-- needed for embedded solr server -->
<dependency>
<groupId>org.apache.solr</groupId>
Expand All @@ -40,26 +39,26 @@
<exclusions>
<exclusion>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-1.2-api</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-sl4j-impl</artifactId>
<artifactId>*</artifactId>
</exclusion>
<exclusion>
<groupId>jdk.tools</groupId>
<artifactId>jdk.tools</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- solr-core pulls in log4j -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>log4j-over-slf4j</artifactId>
<optional>true</optional>
</dependency>
<!-- solr-core pulls in log4j2 -->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-to-slf4j</artifactId>
<optional>true</optional>
</dependency>
</dependencies>
<repositories>
<repository>
Expand Down
Loading

0 comments on commit b27367f

Please sign in to comment.