<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>
		<groupId>org.metawidget.modules.faces</groupId>
		<artifactId>faces-parent</artifactId>
		<version>1.20</version>
		<relativePath>../</relativePath>
	</parent>
	<modelVersion>4.0.0</modelVersion>

	<artifactId>metawidget-faces</artifactId>
	<packaging>jar</packaging>

	<dependencies>
		<dependency>
			<groupId>org.metawidget.modules</groupId>
			<artifactId>metawidget-core</artifactId>
			<version>${project.version}</version>
		</dependency>
		<dependency>
			<groupId>com.sun.faces</groupId>
			<artifactId>jsf-api</artifactId>
		</dependency>
		<dependency>
			<groupId>org.jboss.spec</groupId>
			<artifactId>jboss-javaee-6.0</artifactId>
			<type>pom</type>
		</dependency>
		<dependency>
			<groupId>javax.servlet</groupId>
			<artifactId>jsp-api</artifactId>
		</dependency>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
		</dependency>
		<dependency>
			<groupId>org.metawidget.modules</groupId>
			<artifactId>metawidget-annotation</artifactId>
			<version>${project.version}</version>
			<scope>test</scope>
		</dependency>
	</dependencies>

	<build>
		<plugins>
			<!-- FacesInspector needs 1.5 -->
			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
				<configuration>
					<target>1.5</target>
				</configuration>
			</plugin>		
			<!-- Downgrade other classes to Java 1.4 -->
			<!-- (don't use a second maven-compiler-plugin for this, as m2eclipse gets confused) -->
			<plugin>
				<artifactId>maven-antrun-plugin</artifactId>
				<executions>
					<execution>
						<phase>process-classes</phase>
						<goals>
							<goal>run</goal>
						</goals>
						<configuration>
							<target>
								<delete>
									<fileset dir="target/classes">
										<exclude name="**/*.tld"/>
										<exclude name="**/*.xml"/>
										<exclude name="**/FacesInspector.class" />
										<exclude name="**/UiFaces*.class" />
									</fileset>
								</delete>
								<echo message="Downgrading to jsr14: debug=${maven.compile.debug}, debuglevel=${maven.compiler.debuglevel}, optimize=${maven.compiler.optimize}"/>
								<javac fork="true" srcdir="src/main/java" destdir="target/classes" target="jsr14" includeantruntime="false" debug="${maven.compile.debug}" debuglevel="${maven.compiler.debuglevel}" optimize="${maven.compiler.optimize}">
									<classpath refid="maven.dependency.classpath" />
								</javac>
							</target>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<artifactId>maven-jar-plugin</artifactId>
				<executions>
					<execution>
						<goals>
							<goal>test-jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>

</project>