Skip to content

Commit

Permalink
HOP-2396: Optimize Jetty jars
Browse files Browse the repository at this point in the history
- Do not include Jetty jars in hop-assemblies-libs and include them in hop-client
- Do not include geronimo-servlet neither of them as it overwraps with javax.servlet-api
  • Loading branch information
HiromuHota committed Jan 10, 2021
1 parent 4ddbf62 commit 1618f3d
Show file tree
Hide file tree
Showing 3 changed files with 125 additions and 16 deletions.
112 changes: 111 additions & 1 deletion assemblies/client/pom.xml
Expand Up @@ -33,7 +33,16 @@
</parent>

<properties>

<!-- jetty -->
<jetty-plus.version>9.4.22.v20191022</jetty-plus.version>
<jetty-server.version>9.4.24.v20191120</jetty-server.version>
<jetty-security.version>9.4.22.v20191022</jetty-security.version>
<jetty-servlets.version>9.4.22.v20191022</jetty-servlets.version>
<jetty-xml.version>9.4.22.v20191022</jetty-xml.version>
<jetty-webapp.version>9.4.34.v20201102</jetty-webapp.version>
<jetty-jaas.version>9.4.22.v20191022</jetty-jaas.version>
<jetty-util.version>9.4.22.v20191022</jetty-util.version>
<javax.servlet-api.version>3.1.0</javax.servlet-api.version>
<!-- swt -->
<org.eclipse.swt.gtk.linux.x86_64.version>${org.eclipse.platform.version}</org.eclipse.swt.gtk.linux.x86_64.version>
<org.eclipse.swt.win32.win32.x86_64.version>${org.eclipse.platform.version}</org.eclipse.swt.win32.win32.x86_64.version>
Expand Down Expand Up @@ -97,6 +106,107 @@
<version>${project.version}</version>
</dependency>

<!-- Jetty -->
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-server</artifactId>
<version>${jetty-server.version}</version>
<exclusions>
<exclusion>
<groupId>org.eclipse.jetty.orbit</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-security</artifactId>
<version>${jetty-security.version}</version>
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-servlets</artifactId>
<version>${jetty-servlets.version}</version>
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-servlet</artifactId>
<version>${jetty-servlets.version}</version>
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-xml</artifactId>
<version>${jetty-xml.version}</version>
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-webapp</artifactId>
<version>${jetty-webapp.version}</version>
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-jaas</artifactId>
<version>${jetty-jaas.version}</version>
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-util</artifactId>
<version>${jetty-util.version}</version>
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>${javax.servlet-api.version}</version>
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>

<!-- swt -->
<dependency>
<groupId>org.eclipse.platform</groupId>
Expand Down
6 changes: 4 additions & 2 deletions assemblies/client/src/assembly/assembly.xml
Expand Up @@ -76,10 +76,12 @@
<dependencySet>
<includes>
<include>org.eclipse.platform:org.eclipse.jface</include>
<include>org.apache.hop:hop-ui-rcp:jar</include>
<include>org.apache.hop:hop-ui-rcp</include>
<include>org.eclipse.jetty:*</include>
<include>javax.servlet:javax.servlet-api</include>
</includes>
<outputDirectory>lib</outputDirectory>
<useTransitiveDependencies>false</useTransitiveDependencies>
<useTransitiveDependencies>true</useTransitiveDependencies>
<useProjectArtifact>false</useProjectArtifact>
</dependencySet>

Expand Down
23 changes: 10 additions & 13 deletions assemblies/lib/pom.xml
Expand Up @@ -35,7 +35,6 @@
<properties>

<!-- third party -->
<geronimo-servlet_3.0_spec.version>1.0</geronimo-servlet_3.0_spec.version>
<slf4j-api.version>1.7.7</slf4j-api.version>
<slf4j-log4j12.version>1.7.7</slf4j-log4j12.version>
<apache-log4j-extras>1.2.17</apache-log4j-extras>
Expand Down Expand Up @@ -73,6 +72,16 @@
<groupId>org.apache.hop</groupId>
<artifactId>hop-engine</artifactId>
<version>${project.version}</version>
<exclusions>
<exclusion>
<groupId>javax.servlet</groupId>
<artifactId>*</artifactId>
</exclusion>
<exclusion>
<groupId>org.eclipse.jetty</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.hop</groupId>
Expand Down Expand Up @@ -102,18 +111,6 @@
<artifactId>jaxen</artifactId>
</dependency>

<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-servlet_3.0_spec</artifactId>
<version>${geronimo-servlet_3.0_spec.version}</version>
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>

<!-- Other third-party dependencies -->
<dependency>
<groupId>com.fasterxml.jackson.jaxrs</groupId>
Expand Down

0 comments on commit 1618f3d

Please sign in to comment.