Skip to content

Commit

Permalink
Excluding servlet-related dependencies (geonetwork#1912)
Browse files Browse the repository at this point in the history
These jars should be provided by the servlet container.

Note: If Hadoop transitively requires jetty + jetty:jsp-api +
servlet-api (in wfsfeature-harvester subproject), there is probably a
good reason for this. I preferred to exclude the dependencies from the
web/pom.xml instead of acting on each maven subprojects.

Note 2: some classes actually require the servlet-api jar, so I added it
as a dependency, but keeping it away from the resulting artifact using
the 'provided' scope.

Tests: compilation + runtime on web, no issue so far.
  • Loading branch information
pmauduit committed Nov 3, 2017
1 parent 096d765 commit 833fafe
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions web/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,12 @@
<groupId>${project.groupId}</groupId>
<artifactId>core</artifactId>
<version>${project.version}</version>
<exclusions>
<exclusion>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
Expand Down Expand Up @@ -496,6 +502,31 @@
<groupId>${project.groupId}</groupId>
<artifactId>wfsfeature-harvester</artifactId>
<version>${project.version}</version>
<exclusions>
<exclusion>
<groupId>org.mortbay.jetty</groupId>
<artifactId>servlet-api</artifactId>
</exclusion>
<exclusion>
<groupId>org.mortbay.jetty</groupId>
<artifactId>servlet-api-2.5</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-servlet_3.0_spec</artifactId>
</exclusion>
<exclusion>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jsp-api-2.1</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.0.1</version>
<scope>provided</scope>
</dependency>

<dependency>
Expand Down

0 comments on commit 833fafe

Please sign in to comment.