<?xml version="1.0" encoding="UTF-8"?>
<!--
    JBoss, Home of Professional Open Source Copyright 2010, Red Hat,
    Inc. and individual contributors by the @authors tag. See the
    copyright.txt in the distribution for a full listing of
    individual contributors. This is free software; you can
    redistribute it and/or modify it under the terms of the GNU
    Lesser General Public License as published by the Free Software
    Foundation; either version 2.1 of the License, or (at your
    option) any later version. This software is distributed in the
    hope that it will be useful, but WITHOUT ANY WARRANTY; without
    even the implied warranty of MERCHANTABILITY or FITNESS FOR A
    PARTICULAR PURPOSE. See the GNU Lesser General Public License
    for more details. You should have received a copy of the GNU
    Lesser General Public License along with this software; if not,
    write to the Free Software Foundation, Inc., 51 Franklin St,
    Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF site:
    http://www.fsf.org.
-->
<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>org.richfaces.ui</groupId>
        <artifactId>richfaces-ui-parent</artifactId>
        <version>4.2.2.Final</version>
        <relativePath>../../parent/pom.xml</relativePath>
    </parent>

    <artifactId>static-resources</artifactId>
    <packaging>jar</packaging>
    <name>RichFaces UI Components Static Resources</name>

    <properties>
        <faces.resources.dir>${project.build.outputDirectory}/META-INF/resources</faces.resources.dir>
        <resource.mappings.dir>${project.build.outputDirectory}/META-INF/richfaces</resource.mappings.dir>
    </properties>

    <repositories>
        <repository>
            <id>jboss-public-repository-group</id>
            <name>JBoss Public Repository Group</name>
            <url>http://repository.jboss.org/nexus/content/groups/public/</url>
            <layout>default</layout>
            <releases>
                <enabled>true</enabled>
                <updatePolicy>never</updatePolicy>
            </releases>
            <snapshots>
                <enabled>true</enabled>
                <updatePolicy>never</updatePolicy>
            </snapshots>
        </repository>
    </repositories>

    <dependencies>
        <!-- Core API and Impl -->
        <dependency>
            <groupId>org.richfaces.core</groupId>
            <artifactId>richfaces-core-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.richfaces.core</groupId>
            <artifactId>richfaces-core-impl</artifactId>
        </dependency>
        
        <!-- UI APIs -->
        <dependency>
            <groupId>org.richfaces.ui.common</groupId>
            <artifactId>richfaces-ui-common-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.richfaces.ui.core</groupId>
            <artifactId>richfaces-ui-core-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.richfaces.ui.iteration</groupId>
            <artifactId>richfaces-ui-iteration-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.richfaces.ui.output</groupId>
            <artifactId>richfaces-ui-output-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.richfaces.ui.input</groupId>
            <artifactId>richfaces-ui-input-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.richfaces.ui.dnd</groupId>
            <artifactId>richfaces-ui-dnd-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.richfaces.ui.validator</groupId>
            <artifactId>richfaces-ui-validator-api</artifactId>
        </dependency>
    
        <!-- UI implementations -->
        <dependency>
            <groupId>org.richfaces.ui.common</groupId>
            <artifactId>richfaces-ui-common-ui</artifactId>
        </dependency>
        <dependency>
            <groupId>org.richfaces.ui.core</groupId>
            <artifactId>richfaces-ui-core-ui</artifactId>
        </dependency>
        <dependency>
            <groupId>org.richfaces.ui.misc</groupId>
            <artifactId>richfaces-ui-misc-ui</artifactId>
        </dependency>
        <dependency>
            <groupId>org.richfaces.ui.iteration</groupId>
            <artifactId>richfaces-ui-iteration-ui</artifactId>
        </dependency>
        <dependency>
            <groupId>org.richfaces.ui.output</groupId>
            <artifactId>richfaces-ui-output-ui</artifactId>
        </dependency>
        <dependency>
            <groupId>org.richfaces.ui.input</groupId>
            <artifactId>richfaces-ui-input-ui</artifactId>
        </dependency>
        <dependency>
            <groupId>org.richfaces.ui.dnd</groupId>
            <artifactId>richfaces-ui-dnd-ui</artifactId>
        </dependency>
        <dependency>
            <groupId>org.richfaces.ui.validator</groupId>
            <artifactId>richfaces-ui-validator-ui</artifactId>
        </dependency>
        <dependency>
            <groupId>org.richfaces.ui</groupId>
            <artifactId>richfaces-components-api</artifactId>
        </dependency>

        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>javax.servlet.jsp</groupId>
            <artifactId>jsp-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>javax.el</groupId>
            <artifactId>el-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>javax.servlet.jsp.jstl</groupId>
            <artifactId>jstl-api</artifactId>
            <scope>provided</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.richfaces.cdk</groupId>
                <artifactId>maven-richfaces-resources-plugin</artifactId>
                <configuration>
                    <skins>
                        <skin>blueSky</skin>
                        <skin>classic</skin>
                        <skin>deepMarine</skin>
                        <skin>emeraldTown</skin>
                        <skin>japanCherry</skin>
                        <skin>ruby</skin>
                        <skin>wine</skin>
                        <skin>DEFAULT</skin>
                        <skin>NULL</skin>
                    </skins>
                    <includedContentTypes>
                        <include>application/javascript</include>
                        <include>text/css</include>
                        <include>image/.+</include>
                    </includedContentTypes>
                    <fileNameMappings>
                        <property>
                            <name>^.*showcase.*/([^/]+\.css)$</name>
                            <value>org.richfaces.showcase.css/$1</value>
                        </property>
                        <property>
                            <name>^.+/([^/]+\.(png|gif|jpg))$</name>
                            <value>org.richfaces.images/$1</value>
                        </property>
                        <property>
                            <name>^.+/([^/]+\.css)$</name>
                            <value>org.richfaces.css/$1</value>
                        </property>
                    </fileNameMappings>
                </configuration>
                <executions>
                    <!-- Static -->
                    <execution>
                        <id>static-resources</id>
                        <goals>
                            <goal>process</goal>
                        </goals>
                        <configuration>
                            <pack>false</pack>
                            <compress>false</compress>
                            <resourcesOutputDir>${faces.resources.dir}/org.richfaces.staticResource/${project.version}/Static/</resourcesOutputDir>
                            <staticResourceMappingFile>${resource.mappings.dir}/staticResourceMapping/Static.properties</staticResourceMappingFile>
                            <staticResourcePrefix>org.richfaces.staticResource/${project.version}/Static/</staticResourcePrefix>
                            <excludedFiles>
                                <exclude>^\Qorg.richfaces.renderkit.html.images.\E.*</exclude>
                                <exclude>^\Qorg.richfaces.renderkit.html.iconimages.\E.*</exclude>
                            </excludedFiles>
                        </configuration>
                    </execution>
                    
                    <!-- Compressed -->
                    <execution>
                        <id>compressed-resources</id>
                        <goals>
                            <goal>process</goal>
                        </goals>
                        <configuration>
                            <pack>false</pack>
                            <compress>true</compress>
                            <resourcesOutputDir>${faces.resources.dir}/org.richfaces.staticResource/${project.version}/Compressed/</resourcesOutputDir>
                            <staticResourceMappingFile>${resource.mappings.dir}/staticResourceMapping/Compressed.properties</staticResourceMappingFile>
                            <staticResourcePrefix>org.richfaces.staticResource/${project.version}/Compressed/</staticResourcePrefix>
                            <excludedFiles>
                                <exclude>^\Qorg.richfaces.renderkit.html.images.\E.*</exclude>
                                <exclude>^\Qorg.richfaces.renderkit.html.iconimages.\E.*</exclude>
                            </excludedFiles>
                        </configuration>
                    </execution>
                    
                    <!-- Packed -->
                    <execution>
                        <id>packed-resources</id>
                        <goals>
                            <goal>process</goal>
                        </goals>
                        <configuration>
                            <pack>true</pack>
                            <compress>false</compress>
                            <resourcesOutputDir>${faces.resources.dir}/org.richfaces.staticResource/${project.version}/Packed/</resourcesOutputDir>
                            <staticResourceMappingFile>${resource.mappings.dir}/staticResourceMapping/Packed.properties</staticResourceMappingFile>
                            <staticResourcePrefix>org.richfaces.staticResource/${project.version}/Packed/</staticResourcePrefix>
                            <excludedFiles>
                                <exclude>^\Qorg.richfaces.renderkit.html.images.\E.*</exclude>
                                <exclude>^\Qorg.richfaces.renderkit.html.iconimages.\E.*</exclude>
                                <exclude>^jquery.js$</exclude>
                            </excludedFiles>
                        </configuration>
                    </execution>
                    <execution>
                        <id>resources-excluded-from-packaging</id>
                        <goals>
                            <goal>process</goal>
                        </goals>
                        <configuration>
                            <pack>false</pack>
                            <compress>false</compress>
                            <resourcesOutputDir>${faces.resources.dir}/org.richfaces.staticResource/${project.version}/Packed/</resourcesOutputDir>
                            <staticResourceMappingFile>${resource.mappings.dir}/staticResourceMapping/Packed.properties</staticResourceMappingFile>
                            <staticResourcePrefix>org.richfaces.staticResource/${project.version}/Packed/</staticResourcePrefix>
                            <includedFiles>
                                <include>^jquery.js$</include>
                            </includedFiles>
                        </configuration>
                    </execution>
                    
                    <!-- PackedCompressed -->
                    <execution>
                        <id>packed-compressed-resources</id>
                        <goals>
                            <goal>process</goal>
                        </goals>
                        <configuration>
                            <pack>true</pack>
                            <compress>true</compress>
                            <resourcesOutputDir>${faces.resources.dir}/org.richfaces.staticResource/${project.version}/PackedCompressed/</resourcesOutputDir>
                            <staticResourceMappingFile>${resource.mappings.dir}/staticResourceMapping/PackedCompressed.properties</staticResourceMappingFile>
                            <staticResourcePrefix>org.richfaces.staticResource/${project.version}/PackedCompressed/</staticResourcePrefix>
                            <excludedFiles>
                                <exclude>^\Qorg.richfaces.renderkit.html.images.\E.*</exclude>
                                <exclude>^\Qorg.richfaces.renderkit.html.iconimages.\E.*</exclude>
                                <exclude>^jquery\.js$</exclude>
                            </excludedFiles>
                        </configuration>
                    </execution>
                    <execution>
                        <id>compressed-resources-excluded-from-packaging</id>
                        <goals>
                            <goal>process</goal>
                        </goals>
                        <configuration>
                            <pack>false</pack>
                            <compress>true</compress>
                            <resourcesOutputDir>${faces.resources.dir}/org.richfaces.staticResource/${project.version}/PackedCompressed/</resourcesOutputDir>
                            <staticResourceMappingFile>${resource.mappings.dir}/staticResourceMapping/PackedCompressed.properties</staticResourceMappingFile>
                            <staticResourcePrefix>org.richfaces.staticResource/${project.version}/PackedCompressed/</staticResourcePrefix>
                            <includedFiles>
                                <include>^jquery.js$</include>
                            </includedFiles>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <scm>
        <connection>scm:git:git://github.com/richfaces/components.git</connection>
        <developerConnection>scm:git:git@github.com:richfaces/components.git</developerConnection>
        <url>https://github.com/richfaces/components</url>
    </scm>

</project>
