<?xml version="1.0" encoding="UTF-8"?>

<!--
    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
-->

<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">

    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>org.appfuse</groupId>
        <artifactId>appfuse</artifactId>
        <version>3.5.0</version>
    </parent>

    <artifactId>appfuse-web</artifactId>
    <packaging>pom</packaging>
    <name>AppFuse Web Modules</name>

    <description>
        AppFuse Web Frameworks: JSF, Spring MVC, Struts 2 and Tapestry.
    </description>

    <scm>
        <connection>scm:git:git@github.com:appfuse/appfuse.git</connection>
        <developerConnection>scm:git:git@github.com:appfuse/appfuse.git</developerConnection>
        <url>http://source.appfuse.org/browse/appfuse/web</url>
        <tag>HEAD</tag>
    </scm>

    <modules>
        <module>common</module>
        <module>jsf</module>
        <module>spring</module>
        <module>struts</module>
        <module>tapestry</module>
        <module>wicket</module>
        <module>gwt</module>
    </modules>

    <build>
        <plugins>
            <plugin>
                <groupId>org.appfuse.plugins</groupId>
                <artifactId>appfuse-maven-plugin</artifactId>
                <version>${project.parent.version}</version>
                <configuration>
                    <componentProperties>
                        <implementation>annotationconfiguration</implementation>
                    </componentProperties>
                    <genericCore>${amp.genericCore}</genericCore>
                    <fullSource>${amp.fullSource}</fullSource>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>${jdbc.groupId}</groupId>
                        <artifactId>${jdbc.artifactId}</artifactId>
                        <version>${jdbc.version}</version>
                    </dependency>
                </dependencies>
            </plugin>
            <plugin>
                <groupId>org.eclipse.jetty</groupId>
                <artifactId>jetty-maven-plugin</artifactId>
            </plugin>
            <!-- will package a ready-to-run app regarding hibernate-search index location -->
            <plugin>
                <artifactId>maven-war-plugin</artifactId>
                <configuration>
                    <escapeString>\</escapeString>
                    <webResources>
                        <resource>
                            <directory>src/main/resources/packaged</directory>
                            <targetPath>WEB-INF/classes</targetPath>
                            <filtering>true</filtering>
                            <includes>
                                <include>hibernate.properties</include>
                            </includes>
                        </resource>
                    </webResources>
                    <archive>
                        <manifest>
                            <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                        </manifest>
                        <manifestEntries>
                            <Implementation-Version>${project.version}</Implementation-Version>
                        </manifestEntries>
                    </archive>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>native2ascii-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>native2ascii-utf8</id>
                        <goals>
                            <goal>native2ascii</goal>
                        </goals>
                        <configuration>
                            <encoding>UTF8</encoding>
                            <includes>
                                <include>ApplicationResources_el*.properties</include>
                                <include>ApplicationResources_zh*.properties</include>
                                <include>ApplicationResources_ko*.properties</include>
                                <include>displaytag_el*.properties</include>
                                <include>displaytag_zh*.properties</include>
                                <include>errors_el*</include>
                                <include>errors_ko*</include>
                                <include>errors_tr*</include>
                                <include>errors_zh*</include>
                            </includes>
                        </configuration>
                    </execution>
                    <execution>
                        <id>native2ascii-8859_1</id>
                        <goals>
                            <goal>native2ascii</goal>
                        </goals>
                        <configuration>
                            <encoding>8859_1</encoding>
                            <includes>
                                <include>errors_de.properties</include>
                                <include>errors_fr.properties</include>
                                <include>errors_nl.properties</include>
                                <include>errors_pt*.properties</include>
                            </includes>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
        <resources>
            <resource>
                <filtering>false</filtering>
                <directory>src/main/java</directory>
                <includes>
                    <!-- For Wicket -->
                    <include>**/*.html</include>
                    <include>**/*.properties</include>
                    <!-- For Tapestry -->
                    <include>**/*.tml</include>
                </includes>
            </resource>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
            </resource>
        </resources>
        <testResources>
            <testResource>
                <directory>src/test/resources</directory>
                <filtering>true</filtering>
            </testResource>
            <testResource>
                <directory>src/main/webapp</directory>
                <filtering>true</filtering>
                <includes>
                    <include>**/*.xml</include>
                </includes>
            </testResource>
        </testResources>
    </build>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.appfuse</groupId>
                <artifactId>appfuse-web-common</artifactId>
                <version>${project.parent.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.appfuse</groupId>
                        <artifactId>appfuse-hibernate</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.appfuse</groupId>
                <artifactId>appfuse-${dao.framework}</artifactId>
                <version>${project.parent.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <dependency>
            <groupId>org.appfuse</groupId>
            <artifactId>appfuse-service</artifactId>
            <version>${project.parent.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>org.appfuse</groupId>
                    <artifactId>appfuse-hibernate</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.appfuse</groupId>
            <artifactId>appfuse-${dao.framework}</artifactId>
            <version>${project.parent.version}</version>
        </dependency>
        <!-- Added as compile dependency to hibernate4-maven-plugin picks it up -->
        <dependency>
            <groupId>org.appfuse</groupId>
            <artifactId>appfuse-data-common</artifactId>
            <version>${project.parent.version}</version>
        </dependency>
        <dependency>
            <groupId>commons-dbcp</groupId>
            <artifactId>commons-dbcp</artifactId>
        </dependency>
        <dependency>
            <groupId>org.subethamail</groupId>
            <artifactId>subethasmtp-wiser</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.directwebremoting</groupId>
            <artifactId>dwr</artifactId>
        </dependency>
        <dependency>
            <groupId>net.sf.ehcache</groupId>
            <artifactId>ehcache-web</artifactId>
        </dependency>
        <dependency>
            <groupId>net.sf.ehcache</groupId>
            <artifactId>ehcache-core</artifactId>
        </dependency>
        <dependency>
            <groupId>javax.servlet.jsp</groupId>
            <artifactId>jsp-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>jstl</artifactId>
        </dependency>
        <dependency>
            <groupId>struts-menu</groupId>
            <artifactId>struts-menu</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.velocity</groupId>
            <artifactId>velocity-tools</artifactId>
        </dependency>
        <dependency>
            <groupId>opensymphony</groupId>
            <artifactId>sitemesh</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-taglibs</artifactId>
        </dependency>
        <!-- Needed to load CXF for all web frameworks -->
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-webmvc</artifactId>
        </dependency>
        <dependency>
            <groupId>org.tuckey</groupId>
            <artifactId>urlrewritefilter</artifactId>
        </dependency>
        <dependency>
            <groupId>ro.isdc.wro4j</groupId>
            <artifactId>wro4j-core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.webjars</groupId>
            <artifactId>jquery-cookie</artifactId>
        </dependency>
        <dependency>
            <groupId>org.webjars</groupId>
            <artifactId>bootstrap</artifactId>
        </dependency>
        <dependency>
            <groupId>org.webjars</groupId>
            <artifactId>bootstrap-datepicker</artifactId>
        </dependency>
        <dependency>
            <groupId>org.webjars</groupId>
            <artifactId>bootswatch-spacelab</artifactId>
        </dependency>
        <!-- Necessary for Log4j2 to work at runtime with Velocity -->
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-1.2-api</artifactId>
            <scope>runtime</scope>
        </dependency>
        <!-- Necessary for Log4j2 to work in a web container -->
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-web</artifactId>
            <scope>runtime</scope>
        </dependency>
    </dependencies>
</project>
