Skip to content

Commit

Permalink
Improve dependency enforcement
Browse files Browse the repository at this point in the history
  • Loading branch information
kevin-m-knight-gs committed Jan 4, 2024
1 parent ab8140e commit 999eb1b
Show file tree
Hide file tree
Showing 13 changed files with 94 additions and 107 deletions.
27 changes: 27 additions & 0 deletions legend-engine-ide-lsp-default-extensions/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,33 @@

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<configuration>
<rules>
<bannedDependencies>
<excludes>
<exclude>commons-logging</exclude>
<exclude>io.swagger</exclude>
<exclude>io.zipkin</exclude>
<exclude>io.zipkin.*</exclude>
<exclude>javax.mail</exclude>
<exclude>javax.ws.rs</exclude>
<exclude>junit</exclude>
<exclude>log4j</exclude>
<exclude>org.antlr:antlr4</exclude>
<exclude>org.bouncycastle</exclude>
<exclude>org.slf4j</exclude>
</excludes>
<includes>
<include>org.slf4j:jcl-over-slf4j:${slf4j.version}</include>
<include>org.slf4j:slf4j-api:${slf4j.version}</include>
</includes>
</bannedDependencies>
</rules>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion legend-engine-ide-lsp-extension-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@
<scope>test</scope>
</dependency>
</dependencies>
</project>
</project>
55 changes: 0 additions & 55 deletions legend-engine-ide-lsp-extension/pom.xml

This file was deleted.

23 changes: 22 additions & 1 deletion legend-engine-ide-lsp-server-shaded/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,29 @@
<artifactId>legend-engine-ide-lsp-server-shaded</artifactId>
<name>Legend Engine IDE LSP Server Shaded</name>

<properties>
<logback.version>1.4.14</logback.version>
</properties>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<configuration>
<rules>
<bannedDependencies>
<includes>
<include>ch.qos.logback:*:${logback.version}:jar:runtime</include>
<include>com.google.code.gson:gson:*:jar:runtime</include>
<include>org.eclipse.lsp4j:*:*:jar:runtime</include>
<include>org.finos.legend.engine.ide.lsp:*:${project.version}:jar:runtime</include>
<include>org.slf4j:slf4j-api:${slf4j.version}:jar:runtime</include>
</includes>
</bannedDependencies>
</rules>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
Expand Down Expand Up @@ -73,7 +94,7 @@
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.4.14</version>
<version>${logback.version}</version>
<scope>runtime</scope>
</dependency>
</dependencies>
Expand Down
25 changes: 21 additions & 4 deletions legend-engine-ide-lsp-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,27 @@
<lsp4j.version>0.21.1</lsp4j.version>
</properties>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<configuration>
<rules>
<bannedDependencies>
<includes>
<include>com.google.code.gson:gson:${gson.version}:jar:compile</include>
<include>org.eclipse.lsp4j:*:${lsp4j.version}:jar:compile</include>
<include>org.finos.legend.engine.ide.lsp:*:${project.version}:jar:compile</include>
<include>org.slf4j:slf4j-api:${slf4j.version}:jar:compile</include>
</includes>
</bannedDependencies>
</rules>
</configuration>
</plugin>
</plugins>
</build>

<dependencies>
<!-- LEGEND ENGINE LSP -->
<dependency>
Expand All @@ -41,10 +62,6 @@
<groupId>org.finos.legend.engine.ide.lsp</groupId>
<artifactId>legend-engine-ide-lsp-extension-api</artifactId>
</dependency>
<dependency>
<groupId>org.finos.legend.engine.ide.lsp</groupId>
<artifactId>legend-engine-ide-lsp-extension</artifactId>
</dependency>
<!-- LEGEND ENGINE LSP -->

<dependency>
Expand Down
22 changes: 7 additions & 15 deletions legend-engine-ide-lsp-test-reports/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,12 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<configuration>
<rules combine.self="override">
<requireJavaVersion>
<version>${java.version.range}</version>
</requireJavaVersion>
<rules>
<bannedDependencies>
<includes>
<include>org.finos.legend.engine.ide.lsp:*:${project.version}:jar:compile</include>
</includes>
</bannedDependencies>
</rules>
</configuration>
</plugin>
Expand Down Expand Up @@ -89,16 +91,6 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.finos.legend.engine.ide.lsp</groupId>
<artifactId>legend-engine-ide-lsp-extension</artifactId>
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.finos.legend.engine.ide.lsp</groupId>
<artifactId>legend-engine-ide-lsp-default-extensions</artifactId>
Expand All @@ -120,4 +112,4 @@
</exclusions>
</dependency>
</dependencies>
</project>
</project>
47 changes: 16 additions & 31 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
<modules>
<module>legend-engine-ide-lsp-text-tools</module>
<module>legend-engine-ide-lsp-extension-api</module>
<module>legend-engine-ide-lsp-extension</module>
<module>legend-engine-ide-lsp-server</module>
<module>legend-engine-ide-lsp-default-extensions</module>
<module>legend-engine-ide-lsp-test-reports</module>
Expand Down Expand Up @@ -223,24 +222,11 @@
</requireJavaVersion>
<dependencyConvergence />
<bannedDependencies>
<excludes>
<exclude>commons-logging</exclude>
<exclude>io.swagger</exclude>
<exclude>io.zipkin</exclude>
<exclude>io.zipkin.*</exclude>
<exclude>javax.mail</exclude>
<exclude>javax.ws.rs</exclude>
<exclude>junit</exclude>
<exclude>log4j</exclude>
<exclude>org.antlr:antlr4</exclude>
<exclude>org.bouncycastle</exclude>
<exclude>org.slf4j</exclude>
<excludes combine.children="override">
<exclude>*:*:*:*:compile</exclude>
<exclude>*:*:*:*:runtime</exclude>
<exclude>*:*:*:*:provided</exclude>
</excludes>
<includes>
<include>org.slf4j:jcl-over-slf4j:${slf4j.version}:jar</include>
<include>org.slf4j:slf4j-api:${slf4j.version}</include>
<include>org.slf4j:slf4j-simple:${slf4j.version}:jar:test</include>
</includes>
</bannedDependencies>
</rules>
</configuration>
Expand Down Expand Up @@ -315,11 +301,6 @@
<artifactId>legend-engine-ide-lsp-extension-api</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.finos.legend.engine.ide.lsp</groupId>
<artifactId>legend-engine-ide-lsp-extension</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.finos.legend.engine.ide.lsp</groupId>
<artifactId>legend-engine-ide-lsp-default-extensions</artifactId>
Expand All @@ -332,14 +313,7 @@
</dependency>
<!-- LEGEND ENGINE LSP -->

<dependency>
<groupId>org.junit</groupId>
<artifactId>junit-bom</artifactId>
<version>${junit.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>

<!-- LOGGING -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
Expand All @@ -350,6 +324,17 @@
<artifactId>jcl-over-slf4j</artifactId>
<version>${slf4j.version}</version>
</dependency>
<!-- LOGGING -->

<!-- TEST -->
<dependency>
<groupId>org.junit</groupId>
<artifactId>junit-bom</artifactId>
<version>${junit.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<!-- TEST -->
</dependencies>
</dependencyManagement>
</project>

0 comments on commit 999eb1b

Please sign in to comment.