<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/maven-v4_0_0.xsd">
	<parent>
		<artifactId>framework</artifactId>
		<groupId>org.richfaces</groupId>
		<version>3.2.2.CR2</version>
	</parent>
	<modelVersion>4.0.0</modelVersion>
	<groupId>org.richfaces.framework</groupId>
	<artifactId>richfaces-impl</artifactId>
	<name>Java Server Faces AJAX framework implementation</name>
	<version>3.2.2.CR2</version>
	<build>
		<resources>
			<resource>
				<directory>src/main/resources</directory>
			</resource>
			<resource>
				<directory>target/javascript</directory>
			</resource>
		</resources>
		<plugins>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>javacc-maven-plugin</artifactId>
				<version>2.4</version>
				<executions>
					<execution>
						<goals>
							<goal>javacc</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<artifactId>maven-antrun-plugin</artifactId>
				<executions>
					<execution>
						<id>javascript</id>
						<phase>generate-resources</phase>
						<goals>
							<goal>run</goal>
						</goals>
						<configuration>
							<tasks>
								<ant antfile="${basedir}/generatescript.xml" inheritRefs="true">
									<target name="assembly" />
									<property name="target-dir" value="${project.build.directory}/javascript" />
								</ant>
							</tasks>
							<resourceRoot>${project.build.directory}/javascript</resourceRoot>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.richfaces.cdk</groupId>
				<artifactId>maven-javascript-plugin</artifactId>
				<version>${project.version}</version>
				<executions>
					<execution>
						<goals>
							<goal>compress</goal>
						</goals>
						<configuration>
							<nosuffix>false</nosuffix>
							<outputDirectory>${project.build.directory}/compressed/</outputDirectory>
							<aggregations>
								<aggregation>
									<insertNewLine>true</insertNewLine>
									<output>${project.build.outputDirectory}/org/ajax4jsf/framework.pack.js</output>
									<includes>
										<include>${project.build.directory}/compressed/org/ajax4jsf/javascript/scripts/prototype-min.js</include>
										<include>${project.build.directory}/compressed/org/ajax4jsf/javascript/scripts/AJAX-min.js</include>
										<include>${project.build.directory}/compressed/org/richfaces/renderkit/html/scripts/scriptaculous/scriptaculous-min.js</include>
										<include>${project.build.directory}/compressed/org/richfaces/renderkit/html/scripts/jquery/jquery-min.js</include>
										<include>${project.build.directory}/compressed/org/ajax4jsf/javascript/scripts/dnd-min.js</include>
										<include>**/*-min.js</include>
									</includes>
									<excludes>
										<exclude>**/*.pack.js</exclude>
										<exclude>**/scriptaculous/*.js</exclude>
										<exclude>**/extend-min.js</exclude>
										<exclude>**/jquery.jcarousel-min.js</exclude>
										<exclude>**/compressed.css</exclude>
									</excludes>
								</aggregation>
							</aggregations>
							<resources>
								<resource>
									<directory>target/javascript</directory>
								</resource>
								<resource>
									<directory>src/main/resources</directory>
								</resource>
							</resources>
						</configuration>
					</execution>
					<execution>
						<id>jslint</id>
						<phase>test</phase>
						<goals>
							<goal>jslint</goal>
						</goals>
						<configuration>
							<includes>
								<include>**/framework.pack.js</include>
							</includes>
							<resources>
								<resource>
									<directory>${project.build.outputDirectory}</directory>
								</resource>
							</resources>
						</configuration>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>
	<profiles>
		<profile>
			<id>clover</id>
			<build>
				<plugins>
					<plugin>
						<groupId>com.atlassian.maven.plugins</groupId>
						<artifactId>maven-clover2-plugin</artifactId>
						<configuration>
							<includesAllSourceRoots>false</includesAllSourceRoots>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
	<dependencies>
		<dependency>
			<groupId>opensymphony</groupId>
			<artifactId>oscache</artifactId>
			<version>2.3</version>
			<optional>true</optional>
		</dependency>
		<dependency>
			<groupId>nekohtml</groupId>
			<artifactId>nekohtml</artifactId>
			<version>0.9.5</version>
			<optional>true</optional>
		</dependency>
		<dependency>
			<groupId>commons-digester</groupId>
			<artifactId>commons-digester</artifactId>
			<version>1.8</version>
			<exclusions>
				<exclusion>
					<artifactId>commons-logging</artifactId>
					<groupId>commons-logging</groupId>
				</exclusion>
			</exclusions>
		</dependency>
		<dependency>
			<groupId>org.richfaces.framework</groupId>
			<artifactId>richfaces-api</artifactId>
			<version>3.2.2.CR2</version>
		</dependency>
	</dependencies>
</project>