view webapp/pom.xml @ 1463:a96deb0129a5

trying yuicompressor maven plugin.
author robcast
date Fri, 13 Nov 2015 20:41:23 +0100
parents 0f276f0cc556
children 8821a80fd9bc
line wrap: on
line source

<?xml version="1.0"?>
<project
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
	xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<modelVersion>4.0.0</modelVersion>
	<parent>
		<artifactId>digilib</artifactId>
		<groupId>digilib</groupId>
		<version>2.3-SNAPSHOT</version>
	</parent>
	<artifactId>digilib-webapp</artifactId>
	<name>digilib-webapp</name>
	<description>The Digital Image Library - web application server and HTML and JS clients.</description>
	<url>http://digilib.sourceforge.net</url>
	<packaging>war</packaging>
	
	<properties>
        <skipTests>true</skipTests>
    </properties>

	<build>
		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-war-plugin</artifactId>
					<version>2.6</version>
				</plugin>
				<plugin>
					<groupId>org.codehaus.mojo</groupId>
					<artifactId>license-maven-plugin</artifactId>
					<version>1.4</version>
					<configuration>
						<includes>
							<include>**/*digilib*.js</include>
							<include>**/*.jsp</include>
						</includes>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-surefire-plugin</artifactId>
					<version>2.19</version>
					<configuration>
						<skip>${skipTests}</skip>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>
		<plugins>
                <plugin>
                    <groupId>net.alchim31.maven</groupId>
                    <artifactId>yuicompressor-maven-plugin</artifactId>
                    <version>1.5.1</version>
                    <executions>
                        <execution>
                            <goals>
                                <goal>compress</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <jswarn>false</jswarn>
                        <excludes> 
                            <exclude>**/*.css</exclude>
                        </excludes>
                        <includes>
                            <include>jquery/jquery.digilib.*.js</include>
                        </includes>
                        <aggregations>
                            <aggregation>
                                <insertNewLine>true</insertNewLine>
                                <removeIncluded>true</removeIncluded>
                                <output>${project.build.directory}/${project.build.finalName}/digilib-all-min.js</output>
                                <includes>
                                    <include>jquery/jquery.digilib.*.js</include>
                                </includes>
                            </aggregation>
                        </aggregations>
                    </configuration>
                </plugin>
		</plugins>
	</build>
	<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>compile</scope>
				</dependency>
			</dependencies>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-war-plugin</artifactId>
						<configuration>
							<webXml>${basedir}/src/main/webapp/WEB-INF/web-2.4.xml</webXml>
							<classifier>srv2</classifier>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</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>compile</scope>
				</dependency>
			</dependencies>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-war-plugin</artifactId>
						<configuration>
							<webXml>${basedir}/src/main/webapp/WEB-INF/web-3.0.xml</webXml>
							<classifier>srv3</classifier>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>pdf</id>
			<dependencies>
				<dependency>
					<groupId>digilib</groupId>
					<artifactId>digilib-pdf</artifactId>
					<type>jar</type>
					<scope>compile</scope>
				</dependency>
			</dependencies>
		</profile>
		<profile>
			<id>text</id>
			<dependencies>
				<dependency>
					<groupId>digilib</groupId>
					<artifactId>digilib-text</artifactId>
					<type>jar</type>
					<scope>compile</scope>
				</dependency>
			</dependencies>
		</profile>
		<profile>
			<id>codec-jai</id>
			<dependencies>
				<dependency>
					<groupId>digilib</groupId>
					<artifactId>digilib-common-jai</artifactId>
					<type>jar</type>
					<scope>compile</scope>
				</dependency>
			</dependencies>
		</profile>
		<profile>
			<id>codec-imagej</id>
			<dependencies>
				<dependency>
					<groupId>digilib</groupId>
					<artifactId>digilib-common-imagej</artifactId>
					<type>jar</type>
					<scope>compile</scope>
				</dependency>
			</dependencies>
		</profile>
		<profile>
			<id>codec-bioformats</id>
			<dependencies>
				<dependency>
					<groupId>digilib</groupId>
					<artifactId>digilib-common-bioformats</artifactId>
					<type>jar</type>
					<scope>compile</scope>
				</dependency>
			</dependencies>
		</profile>
        <profile>
            <id>cors-filter</id>
            <!--  external servlet filter to add CORS headers. enable in web.xml -->
            <dependencies>
                <dependency>
                    <groupId>org.eclipse.jetty</groupId>
                    <artifactId>jetty-servlets</artifactId>
                    <version>9.2.13.v20150730</version>
                </dependency>
            </dependencies>
        </profile>
	</profiles>
	<dependencies>
		<dependency>
			<groupId>org.eclipse.jetty</groupId>
			<artifactId>jetty-servlet</artifactId>
            <version>9.2.13.v20150730</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.eclipse.jetty</groupId>
			<artifactId>jetty-http</artifactId>
			<version>9.2.13.v20150730</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.12</version>
			<scope>test</scope>
		</dependency>
	</dependencies>
</project>