<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>samples</artifactId>
		<groupId>org.richfaces</groupId>
		<version>3.1.3.GA</version>
	</parent>
	<modelVersion>4.0.0</modelVersion>
	<groupId>org.richfaces.samples</groupId>
	<artifactId>richfaces-demo</artifactId>
	<version>3.1.3.GA</version>
	<packaging>war</packaging>
	<name>richfaces-demo Maven Webapp</name>
	<dependencies>
		<dependency>
			<groupId>org.richfaces.ui</groupId>
			<artifactId>richfaces-ui</artifactId>
			<version>3.1.3.GA</version>
		</dependency>
		<dependency>
			<groupId>com.uwyn</groupId>
			<artifactId>jhighlight</artifactId>
			<version>1.0</version>
		</dependency>
		<dependency>
			<groupId>org.richfaces.ui</groupId>
			<artifactId>core</artifactId>
			<version>3.1.3.GA</version>
			<scope>provided</scope>
		</dependency>
	</dependencies>
	<build>
		<finalName>richfaces-demo</finalName>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-dependency-plugin</artifactId>
				<executions>
					<execution>
						<id>unpack</id>
						<phase>generate-resources</phase>
						<goals>
							<goal>unpack</goal>
						</goals>
						<configuration>
							<artifactItems>
								<artifactItem>
									<groupId>org.richfaces.ui</groupId>
									<artifactId>
										richfaces-ui
									</artifactId>
									<version>
										${project.version}
									</version>
								</artifactItem>
							</artifactItems>
							<outputDirectory>
								${project.build.directory}/richfaces
							</outputDirectory>
							<overWriteReleases>false</overWriteReleases>
							<overWriteSnapshots>
								true
							</overWriteSnapshots>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>exec-maven-plugin</artifactId>
				<dependencies>
					<dependency>
						<groupId>taglibrarydoc</groupId>
						<artifactId>tlddoc</artifactId>
						<version>1.3</version>
					</dependency>
				</dependencies>
				<configuration>
					<includeProjectDependencies>
						false
					</includeProjectDependencies>
					<includePluginDependencies>
						true
					</includePluginDependencies>
					<executableDependency>
						<groupId>taglibrarydoc</groupId>
						<artifactId>tlddoc</artifactId>
					</executableDependency>
					<mainClass>com.sun.tlddoc.TLDDoc</mainClass>
					<arguments>
						<argument>-d</argument>
						<argument>
							${project.build.directory}/${project.build.finalName}/WEB-INF/tlddoc
						</argument>
						<argument>-xslt</argument>
						<argument>
							${basedir}/src/main/xslt/tlddoc
						</argument>
						<argument>
							${project.build.directory}/richfaces/META-INF/ajax4jsf.tld
						</argument>
						<argument>
							${project.build.directory}/richfaces/META-INF/rich.tld
						</argument>
					</arguments>
				</configuration>

				<executions>
					<execution>
						<id>tlddoc</id>
						<phase>process-resources</phase>
						<goals>
							<goal>java</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<configuration>
					<source>1.5</source>
					<target>1.5</target>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-war-plugin</artifactId>
				<configuration>
					<webResources>
						<resource>
							<!-- this is relative to the pom.xml directory -->
							<directory>
								${basedir}/src/main/java
							</directory>
							<targetPath>/WEB-INF/src</targetPath>
						</resource>
					</webResources>
				</configuration>
			</plugin>
		</plugins>
	</build>

	<profiles>
		<profile>
			<id>release</id>
			<build>
			<finalName>${artifactId}-${version}</finalName>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-war-plugin</artifactId>
						<configuration>
							<webResources>
								<resource>
									<!-- this is relative to the pom.xml directory -->
									<directory>
										${basedir}/src/main/java
									</directory>
									<targetPath>
										/WEB-INF/src
									</targetPath>
								</resource>
							</webResources>
						</configuration>
						<executions>
							<execution>
								<id>jee5</id>
								<goals>
									<goal>war</goal>
								</goals>
								<phase>package</phase>
								<configuration>
									<webappDirectory>
										${project.build.directory}/${project.build.finalName}-jee5
									</webappDirectory>
									<classifier>jee5</classifier>
									<warSourceExcludes>
										WEB-INF/lib/jsf-api*,WEB-INF/lib/jsf-impl*,WEB-INF/lib/el-*
									</warSourceExcludes>
								</configuration>
							</execution>
							<execution>
								<id>tomcat6</id>
								<goals>
									<goal>war</goal>
								</goals>
								<phase>package</phase>
								<configuration>
									<webappDirectory>
										${project.build.directory}/${project.build.finalName}-tomcat6
									</webappDirectory>
									<classifier>tomcat6</classifier>
									<warSourceExcludes>
										WEB-INF/lib/el-*
									</warSourceExcludes>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
			<dependencies>
				<dependency>
					<groupId>javax.el</groupId>
					<artifactId>el-api</artifactId>
					<version>1.0</version>
				</dependency>
				<dependency>
					<groupId>el-impl</groupId>
					<artifactId>el-impl</artifactId>
					<version>1.0</version>
				</dependency>
				<dependency>
					<groupId>javax.servlet</groupId>
					<artifactId>servlet-api</artifactId>
					<version>2.4</version>
					<scope>provided</scope>
				</dependency>
				<dependency>
					<groupId>javax.servlet.jsp</groupId>
					<artifactId>jsp-api</artifactId>
					<version>2.0</version>
					<scope>provided</scope>
				</dependency>
				<dependency>
					<groupId>javax.faces</groupId>
					<artifactId>jsf-api</artifactId>
					<version>1.2_04-p02</version>
				</dependency>
				<dependency>
					<groupId>javax.faces</groupId>
					<artifactId>jsf-impl</artifactId>
					<version>1.2_04-p02</version>
					<scope>runtime</scope>
				</dependency>
			</dependencies>
		</profile>
	</profiles>
</project>