Mercurial > hg > digilib
view text/pom.xml @ 1690:a0a8dbecb94c
Change web.xml setup to use WebServlet annotations.
Solves problem of having the correct web.xml when combining Servlets
via Maven profiles.
Works only with Servlet 3. For Servlet 2 you still need to patch
your own set of Servlets into web-2.4.xml.
You can still override Servlet mappings in web.xml if you want
(watch out for servlet-name).
author | Robert Casties <casties@mpiwg-berlin.mpg.de> |
---|---|
date | Mon, 26 Mar 2018 20:46:01 +0200 |
parents | 93b59a801711 |
children |
line wrap: on
line source
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <artifactId>digilib</artifactId> <groupId>digilib</groupId> <version>2.6-SNAPSHOT</version> </parent> <artifactId>digilib-text</artifactId> <name>digilib-text</name> <dependencies> <dependency> <groupId>digilib</groupId> <artifactId>digilib-common</artifactId> <type>jar</type> <scope>compile</scope> </dependency> </dependencies> <description>The Digital Image Library - text (plain or XML) serving servlet</description> <url>https://github.com/robcast/digilib</url> <profiles> <profile> <id>servlet2</id> <activation> <property> <name>servletapi</name> <value>2</value> </property> </activation> <dependencies> <dependency> <groupId>digilib</groupId> <artifactId>digilib-servlet2</artifactId> <type>jar</type> <scope>provided</scope> </dependency> <dependency> <groupId>javax.servlet</groupId> <artifactId>servlet-api</artifactId> <version>2.4</version> <type>jar</type> <scope>provided</scope> </dependency> </dependencies> </profile> <profile> <id>servlet3</id> <activation> <activeByDefault>true</activeByDefault> <property> <name>servletapi</name> <value>3</value> </property> </activation> <dependencies> <dependency> <groupId>digilib</groupId> <artifactId>digilib-servlet3</artifactId> <type>jar</type> <scope>provided</scope> </dependency> <dependency> <groupId>org.mortbay.jetty</groupId> <artifactId>servlet-api</artifactId> <version>3.0.20100224</version> <type>jar</type> <scope>provided</scope> </dependency> </dependencies> </profile> </profiles> </project>