<?xml version="1.0"?>
<!--
/*
 * $Id: pom.xml 731669 2009-01-05 19:57:18Z musachy $
 *
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you 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">
    <parent>
        <artifactId>struts2-plugins</artifactId>
        <groupId>org.apache.struts</groupId>
        <version>2.1.6</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>
    <groupId>org.apache.struts</groupId>
    <artifactId>struts2-dojo-plugin</artifactId>
    <name>Struts 2 Dojo Plugin</name>

    <scm>
        <connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_1_6/plugins/dojo</connection>
        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_1_6/plugins/dojo</developerConnection>
        <url>http://svn.apache.org/viewcvs.cgi/struts/struts2/tags/STRUTS_2_1_6/plugins/dojo</url>
    </scm>
    <profiles>
        <profile>
            <id>release</id>
            <activation>
                <property>
                    <name>release</name>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>rat-maven-plugin</artifactId>
                        <version>1.0-alpha-2</version>
                        <executions>
                            <execution>
                                <phase>verify</phase>
                                <goals>
                                    <goal>check</goal>
                                </goals>
                                <configuration>
                                    <addDefaultLicenseMatchers>false</addDefaultLicenseMatchers>
                                    <licenseMatchers>
                                        <classNames>
                                            <className>rat.analysis.license.ApacheSoftwareLicense20</className>
                                        </classNames>
                                    </licenseMatchers>
                                    <includes>
                                        <include>pom.xml</include>
                                        <include>src/**</include>
                                    </includes>
                                    <excludes>
                                        <exclude>src/main/resources/org/apache/struts2/static/dojo/nls/**</exclude>
                                        <exclude>src/main/resources/org/apache/struts2/static/dojo/src/**</exclude>
                                        <exclude>src/main/resources/org/apache/struts2/static/dojo/*</exclude>
                                        <exclude>src/test/resources/org/apache/struts2/dojo/views/jsp/ui/**</exclude>
                                    </excludes>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.myfaces.tobago</groupId>
                <artifactId>maven-apt-plugin</artifactId>
                <version>1.0.15</version>
                <configuration>
                    <A>
                        uri=/struts-dojo-tags,tlibVersion=2.2.3,jspVersion=2.0,shortName=sx,displayName="Struts
                        Dojo Tags",
                        outFile=${basedir}/target/classes/META-INF/struts-dojo-tags.tld,
                        description="Struts AJAX tags based on Dojo.",
                        outTemplatesDir=${basedir}/../../core/src/site/resources/tags/ajax
                    </A>
                    <resourceTargetPath>target</resourceTargetPath>
                    <fork>false</fork>
                    <force>true</force>
                    <nocompile>true</nocompile>
                    <showWarnings>true</showWarnings>
                    <factory>
                        org.apache.struts.annotations.taglib.apt.TLDAnnotationProcessorFactory
                    </factory>
                    <target>1.5</target>
                    <includes>
                        <include>**/*.java</include>
                    </includes>
                </configuration>
                <executions>
                    <execution>
                        <phase>compile</phase>
                        <goals>
                            <goal>execute</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <dependencies>

        <!-- Core -->
        <dependency>
            <groupId>org.apache.struts</groupId>
            <artifactId>struts2-core</artifactId>
            <version>${pom.version}</version>
        </dependency>

        <!-- JSP API -->
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>jsp-api</artifactId>
            <version>2.0</version>
            <scope>provided</scope>
        </dependency>

        <!-- Velocity -->
        <dependency>
            <groupId>org.apache.velocity</groupId>
            <artifactId>velocity</artifactId>
            <version>1.5</version>
            <optional>true</optional>
        </dependency>

        <!-- Test dependencies -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
            <version>3.8.2</version>
        </dependency>
        <dependency>
            <groupId>${pom.groupId}</groupId>
            <artifactId>struts2-junit-plugin</artifactId>
            <version>${pom.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>jmock</groupId>
            <artifactId>jmock</artifactId>
            <version>1.0.1</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.easymock</groupId>
            <artifactId>easymock</artifactId>
            <version>2.0</version>
            <scope>test</scope>
        </dependency>
        <!--dependency>
            <groupId>org.easymock</groupId>
            <artifactId>easymockclassextension</artifactId>
            <version>1.1</version>
            <scope>test</scope>
            <exclusions>
            <exclusion>
            <groupId>org.easymock</groupId>
            <artifactId>easymock</artifactId>
            </exclusion>
            </exclusions>
            </dependency-->

        <dependency>
            <groupId>jmock</groupId>
            <artifactId>jmock-cglib</artifactId>
            <version>1.0.1</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>mockobjects</groupId>
            <artifactId>mockobjects-core</artifactId>
            <version>0.09</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>mockobjects</groupId>
            <artifactId>mockobjects-jdk1.3</artifactId>
            <version>0.09</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>mockobjects</groupId>
            <artifactId>mockobjects-alt-jdk1.3</artifactId>
            <version>0.09</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>mockobjects</groupId>
            <artifactId>mockobjects-alt-jdk1.3-j2ee1.3</artifactId>
            <version>0.09</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>mockobjects</groupId>
            <artifactId>mockobjects-jdk1.3-j2ee1.3</artifactId>
            <version>0.09</version>
            <scope>test</scope>
        </dependency>


        <!-- Mocks for unit testing (by Spring) -->
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-mock</artifactId>
            <version>2.0.8</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-core</artifactId>
            <version>2.0.8</version>
            <scope>test</scope>
        </dependency>

         <!-- struts-annotations must be in compile scope for maven-apt-plugin to
        function correctly. Marking it optional to exclude it from transitive
        dependency resolution -->
        <dependency>
            <groupId>org.apache.struts</groupId>
            <artifactId>struts-annotations</artifactId>
            <optional>true</optional>
        </dependency>
    </dependencies>

    <reporting>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>rat-maven-plugin</artifactId>
                <version>1.0-alpha-2</version>
                <configuration>
                    <includes>
                        <include>pom.xml</include>
                        <include>src/**</include>
                    </includes>
                    <excludes>
                        <exclude>src/main/resources/org/apache/struts2/static/dojo/nls/**</exclude>
                        <exclude>src/main/resources/org/apache/struts2/static/dojo/src/**</exclude>
                        <exclude>src/main/resources/org/apache/struts2/static/dojo/*</exclude>
                        <exclude>src/test/resources/org/apache/struts2/dojo/views/jsp/ui/**</exclude>
                    </excludes>
                </configuration>
            </plugin>
        </plugins>
    </reporting>
</project>
