<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>
	<parent>
		<groupId>be.novelfaces</groupId>
		<artifactId>novelfaces</artifactId>
		<version>0.2.1</version>
	</parent>
	<groupId>be.novelfaces</groupId>
	<artifactId>novelfaces-components</artifactId>
	<version>0.2.1</version>
	<packaging>jar</packaging>
	<organization>
		<name>${appName}</name>
		<url>http://novelfaces-showcase.appspot.com/</url>
	</organization>
	<name>${appName} Components Library module</name>

	<dependencies>
		<dependency>
			<groupId>org.apache.myfaces.core</groupId>
			<artifactId>myfaces-api</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.myfaces.core</groupId>
			<artifactId>myfaces-impl</artifactId>
		</dependency>
		<dependency>
			<groupId>org.richfaces.cdk</groupId>
			<artifactId>annotations</artifactId>
		</dependency>
		<dependency>
			<groupId>commons-lang</groupId>
			<artifactId>commons-lang</artifactId>
		</dependency>
		<dependency>
			<groupId>com.google.code.gson</groupId>
			<artifactId>gson</artifactId>
		</dependency>
		<dependency>
			<groupId>com.google.jstestdriver</groupId>
			<artifactId>maven-jstestdriver-plugin</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.jboss.test-jsf</groupId>
			<artifactId>jsf-mock</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.jboss.test-jsf</groupId>
			<artifactId>jsf-test-stage</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.jboss.test-jsf</groupId>
			<artifactId>htmlunit-client</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>xmlunit</groupId>
			<artifactId>xmlunit</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>javax.el</groupId>
			<artifactId>el-api</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.easytesting</groupId>
			<artifactId>fest-assert</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.easytesting</groupId>
			<artifactId>fest-reflect</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>commons-io</groupId>
			<artifactId>commons-io</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>com.google.guava</groupId>
			<artifactId>guava</artifactId>
			<scope>test</scope>
		</dependency>
	</dependencies>
	<build>
		<finalName>novelfaces-components</finalName>
		<resources>
			<resource>
				<directory>src/main/resources</directory>
			</resource>
			<resource>
				<targetPath>${project.build.directory}/tldoc</targetPath>
				<directory>${project.basedir}/src/main/xsl</directory>
				<excludes>
			        <exclude>**/*.xsl</exclude>
			    </excludes>
			</resource>
		</resources>
		<plugins>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>xml-maven-plugin</artifactId>
				<executions>
					<execution>
						<goals>
							<goal>transform</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<transformationSets>
						<transformationSet>
							<dir>${project.basedir}/src/main/resources/META-INF</dir>
							<includes>
								<include>novelfaces.taglib.xml</include>
							</includes>
							<stylesheet>${project.basedir}/src/main/xsl/taglib_to_html.xsl</stylesheet>
							<outputDir>${project.build.directory}/tldoc</outputDir>
							<fileMappers>
								<fileMapper implementation="org.codehaus.plexus.components.io.filemappers.FileExtensionMapper">
									<targetExtension>.html</targetExtension>
								</fileMapper>
							</fileMappers>
							<parameters>
								<parameter>
									<name>version</name>
									<value>${project.version}</value>
								</parameter>
							</parameters>
						</transformationSet>
					</transformationSets>
				</configuration>
			</plugin>
			<plugin>
				<groupId>net.alchim31.maven</groupId>
				<artifactId>yuicompressor-maven-plugin</artifactId>
				<executions>
					<execution>
						<goals>
							<goal>jslint</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<failOnWarning>true</failOnWarning>
					<encoding>UTF-8</encoding>
					<excludes>
						<exclude>**/jquery-1.6.4.js</exclude>
						<exclude>**/modernizr.js</exclude>
						<exclude>**/*min.js</exclude>
					</excludes>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-deploy-plugin</artifactId>
				<configuration>
					<skip>false</skip>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-release-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<configuration>
					<skipTests>${skipUTs}</skipTests>
					<excludes>
						<exclude>**/**/*HtmlUnitTest.java</exclude>
					</excludes>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-failsafe-plugin</artifactId>
				<configuration>
					<skipTests>${skipITs}</skipTests>
					<includes>
						<include>**/**/*HtmlUnitTest.java</include>
					</includes>
				</configuration>
				<executions>
					<execution>
						<id>integration-test</id>
						<goals>
							<goal>integration-test</goal>
						</goals>
					</execution>
					<execution>
						<id>verify</id>
						<goals>
							<goal>verify</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
				<configuration>
					<finalName>novelfaces-components-${project.version}</finalName>
					<archive>
						<manifest>
							<addDefaultImplementationEntries>true
							</addDefaultImplementationEntries>
							<addDefaultSpecificationEntries>true
							</addDefaultSpecificationEntries>
						</manifest>
						<manifestEntries>
							<Implementation-Build>${buildNumber}</Implementation-Build>
						</manifestEntries>
					</archive>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<executions>
					<execution>
						<id>attach-sources</id>
						<goals>
							<goal>jar-no-fork</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<finalName>novelfaces-components-${project.version}</finalName>
				</configuration>
			</plugin>
		</plugins>
	</build>

	<profiles>
		<profile>
			<id>cdk</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.richfaces.cdk</groupId>
						<artifactId>maven-cdk-plugin</artifactId>
						<version>${cdk.version}</version>
						<executions>
							<execution>
								<id>cdk-generate-sources</id>
								<phase>generate-sources</phase>
								<goals>
									<goal>generate</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>assemble</id>
			<build>
				<plugins>
					<plugin>
						<groupId>gr.abiss.mvn.plugins</groupId>
						<artifactId>maven-jstools-plugin</artifactId>
						<executions>
							<execution>
								<id>jsdoc</id>
								<configuration>
									<jsDir>${basedir}/src/main/resources/META-INF/resources</jsDir>
									<includes>**/novelfaces.js</includes>
									<caseSensitive>true</caseSensitive>
								</configuration>
								<goals>
									<goal>jsdoc</goal>
								</goals>
								<phase>process-sources</phase>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<!-- pack jsdoc tldoc to jar -->
						<artifactId>maven-jar-plugin</artifactId>
						<executions>
							<execution>
								<id>pack-jsdocs</id>
								<phase>package</phase>
								<goals>
									<goal>jar</goal>
								</goals>
								<configuration>
									<classesDirectory>${basedir}/target/site/jsdoc
									</classesDirectory>
									<classifier>jsdoc</classifier>
									<!-- <excludes> <exclude>**/symbols/src/*</exclude> </excludes> -->
								</configuration>
							</execution>
							<execution>
								<id>pack-tldocs</id>
								<phase>package</phase>
								<goals>
									<goal>jar</goal>
								</goals>
								<configuration>
									<classesDirectory>${project.build.directory}/tldoc
									</classesDirectory>
									<classifier>tldoc</classifier>
								</configuration>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-javadoc-plugin</artifactId>
						<executions>
							<execution>
								<id>generate-javadoc</id>
								<phase>package</phase>
								<goals>
									<goal>jar</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>compress</id>
			<pluginRepositories>
				<pluginRepository>
					<name>oss.sonatype.org</name>
					<id>oss.sonatype.org</id>
					<url>http://oss.sonatype.org/content/groups/public</url>
				</pluginRepository>
			</pluginRepositories>
			<build>
				<plugins>
					<plugin>
						<groupId>net.alchim31.maven</groupId>
						<artifactId>yuicompressor-maven-plugin</artifactId>
						<executions>
							<execution>
								<goals>
									<goal>compress</goal>
								</goals>
							</execution>
						</executions>
						<configuration>
							<outputDirectory>src/main/resources</outputDirectory>
							<encoding>UTF-8</encoding>
							<excludes>
								<exclude>**/*min.js</exclude>
							</excludes>
						</configuration>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-source-plugin</artifactId>
						<executions>
							<execution>
								<id>attach-source</id>
								<goals>
									<goal>jar</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>

		</profile>
		<profile>
			<id>jstests</id>
			<build>
				<plugins>
					<plugin>
						<groupId>com.google.jstestdriver</groupId>
						<artifactId>maven-jstestdriver-plugin</artifactId>
						<version>1.2.2-SNAPSHOT</version>
						<executions>
							<execution>
								<id>run-tests-firefox</id>
								<phase>test</phase>
								<goals>
									<goal>test</goal>
								</goals>
								<configuration>
									<browser>${firefox.path}</browser>
									<port>4224</port>
									<basePath>${basedir}</basePath>
									<testOutput>target/testReports</testOutput>
									<config>jsTestDriver.conf</config>
								</configuration>
							</execution>
							<execution>
								<id>run-tests-ie</id>
								<phase>test</phase>
								<goals>
									<goal>test</goal>
								</goals>
								<configuration>
									<browser>${ie.path}</browser>
									<port>4224</port>
									<basePath>${basedir}</basePath>
									<testOutput>target/testReports</testOutput>
									<config>jsTestDriver.conf</config>
								</configuration>
							</execution>
							<execution>
								<id>run-tests-opera</id>
								<phase>test</phase>
								<goals>
									<goal>test</goal>
								</goals>
								<configuration>
									<browser>${opera.path}</browser>
									<port>4224</port>
									<basePath>${basedir}</basePath>
									<testOutput>target/testReports</testOutput>
									<config>jsTestDriver.conf</config>
								</configuration>
							</execution>
							<execution>
								<id>run-tests-safari</id>
								<phase>test</phase>
								<goals>
									<goal>test</goal>
								</goals>
								<configuration>
									<browser>${safari.path}</browser>
									<port>4224</port>
									<basePath>${basedir}</basePath>
									<testOutput>target/testReports</testOutput>
									<config>jsTestDriver.conf</config>
								</configuration>
							</execution>
							<execution>
								<id>run-tests-chrome</id>
								<phase>test</phase>
								<goals>
									<goal>test</goal>
								</goals>
								<configuration>
									<browser>${chrome.path}</browser>
									<port>4224</port>
									<basePath>${basedir}</basePath>
									<testOutput>target/testReports</testOutput>
									<config>jsTestDriver.conf</config>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>jstests-ff</id>
			<build>
				<plugins>
					<plugin>
						<groupId>com.google.jstestdriver</groupId>
						<artifactId>maven-jstestdriver-plugin</artifactId>
						<version>1.2.2-SNAPSHOT</version>
						<executions>
							<execution>
								<id>run-tests-firefox</id>
								<phase>test</phase>
								<goals>
									<goal>test</goal>
								</goals>
								<configuration>
									<browser>${firefox.path}</browser>
									<port>4224</port>
									<basePath>${basedir}</basePath>
									<testOutput>target/testReports</testOutput>
									<config>jsTestDriver.conf</config>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>jstests-ie</id>
			<build>
				<plugins>
					<plugin>
						<groupId>com.google.jstestdriver</groupId>
						<artifactId>maven-jstestdriver-plugin</artifactId>
						<version>1.2.2-SNAPSHOT</version>
						<executions>
							<execution>
								<id>run-tests-ie</id>
								<phase>test</phase>
								<goals>
									<goal>test</goal>
								</goals>
								<configuration>
									<browser>${ie.path}</browser>
									<port>4224</port>
									<basePath>${basedir}</basePath>
									<testOutput>target/testReports</testOutput>
									<config>jsTestDriver.conf</config>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<activation>
				<os>
					<name>Windows 7</name>
					<family>Windows</family>
				</os>
			</activation>
			<properties>
				<firefox.path>${FF_PATH}</firefox.path>
				<ie.path>${IE_PATH}</ie.path>
				<chrome.path>${CHROME_PATH}</chrome.path>
				<safari.path>${SAFARI_PATH}</safari.path>
				<opera.path>${OPERA_PATH}</opera.path>
				<browsers.path>${firefox.path},${ie.path},${chrome.path},${safari.path},${opera.path}
				</browsers.path>
			</properties>
		</profile>
	</profiles>
</project>