123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219 |
- <?xml version="1.0" encoding="UTF-8"?>
- <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>
- <groupId>hello.world</groupId>
- <artifactId>world</artifactId>
- <name>Servlet</name>
- <packaging>war</packaging>
- <version>1.0.0-BUILD-SNAPSHOT</version>
- <properties>
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <java-version>1.8</java-version>
- <cache2k-version>1.0.2.Final</cache2k-version>
- <jackson-version>2.9.3</jackson-version>
- <!-- This is the default web.xml for plaintext and json only -->
- <maven.war.xml>src/main/webapp/WEB-INF/web.xml</maven.war.xml>
- </properties>
- <dependencies>
- <dependency>
- <groupId>com.fasterxml.jackson.core</groupId>
- <artifactId>jackson-databind</artifactId>
- <version>${jackson-version}</version>
- </dependency>
- <dependency>
- <groupId>com.fasterxml.jackson.module</groupId>
- <artifactId>jackson-module-afterburner</artifactId>
- <version>${jackson-version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.taglibs</groupId>
- <artifactId>taglibs-standard-impl</artifactId>
- <version>1.2.5</version>
- </dependency>
- <!-- @Inject -->
- <dependency>
- <groupId>javax.inject</groupId>
- <artifactId>javax.inject</artifactId>
- <version>1</version>
- </dependency>
- <!-- Servlet -->
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
- <version>2.5</version>
- <scope>provided</scope>
- </dependency>
- <!-- cache2k -->
- <dependency>
- <groupId>org.cache2k</groupId>
- <artifactId>cache2k-api</artifactId>
- <version>${cache2k-version}</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.cache2k</groupId>
- <artifactId>cache2k-all</artifactId>
- <version>${cache2k-version}</version>
- <scope>runtime</scope>
- </dependency>
- </dependencies>
- <profiles>
- <profile>
- <id>afterburner</id>
- <properties>
- <maven.war.xml>src/main/resources/WEB-INF/afterburner/web.xml</maven.war.xml>
- </properties>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-war-plugin</artifactId>
- <configuration>
- <webResources>
- <resource>
- <directory>src/main/resources/WEB-INF/afterburner</directory>
- <excludes>
- <exclude>src/main/resources/WEB-INF/</exclude>
- </excludes>
- <targetPath>WEB-INF</targetPath>
- </resource>
- </webResources>
- </configuration>
- </plugin>
- </plugins>
- </build>
- </profile>
- <profile>
- <id>cjs</id>
- <properties>
- <maven.war.xml>src/main/resources/WEB-INF/cjs/web.xml</maven.war.xml>
- </properties>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-war-plugin</artifactId>
- <configuration>
- <webResources>
- <resource>
- <directory>src/main/resources/WEB-INF/cjs</directory>
- <excludes>
- <exclude>src/main/resources/WEB-INF/</exclude>
- </excludes>
- <targetPath>WEB-INF</targetPath>
- </resource>
- </webResources>
- </configuration>
- </plugin>
- </plugins>
- </build>
- </profile>
- <profile>
- <id>mysql</id>
- <properties>
- <maven.war.xml>src/main/resources/WEB-INF/mysql/web.xml</maven.war.xml>
- </properties>
- <dependencies>
- <dependency>
- <groupId>mysql</groupId>
- <artifactId>mysql-connector-java</artifactId>
- <version>5.1.42</version>
- </dependency>
- </dependencies>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-war-plugin</artifactId>
- <configuration>
- <webResources>
- <resource>
- <directory>src/main/resources/WEB-INF/mysql</directory>
- <includes>
- <include>resin-web.xml</include>
- </includes>
- <excludes>
- <exclude>src/main/resources/WEB-INF/</exclude>
- </excludes>
- <targetPath>WEB-INF</targetPath>
- </resource>
- </webResources>
- </configuration>
- </plugin>
- </plugins>
- </build>
- </profile>
- <profile>
- <id>postgresql</id>
- <properties>
- <maven.war.xml>src/main/resources/WEB-INF/postgresql/web.xml</maven.war.xml>
- </properties>
- <dependencies>
- <dependency>
- <groupId>org.postgresql</groupId>
- <artifactId>postgresql</artifactId>
- <version>42.1.4</version>
- </dependency>
- </dependencies>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-war-plugin</artifactId>
- <configuration>
- <webResources>
- <resource>
- <directory>src/main/resources/WEB-INF/postgresql</directory>
- <includes>
- <include>resin-web.xml</include>
- </includes>
- <excludes>
- <exclude>src/main/resources/WEB-INF/</exclude>
- </excludes>
- <targetPath>WEB-INF</targetPath>
- </resource>
- </webResources>
- </configuration>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>2.3.2</version>
- <configuration>
- <source>${java-version}</source>
- <target>${java-version}</target>
- <optimize>true</optimize>
- <debug>false</debug>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-war-plugin</artifactId>
- <version>3.1.0</version>
- <configuration>
- <warName>servlet</warName>
- <!-- Use the web.xml from the current profile -->
- <webXml>${maven.war.xml}</webXml>
- </configuration>
- </plugin>
- </plugins>
- </build>
- </project>
|