<?xml version="1.0" encoding="UTF-8"?>
<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.apache.struts</groupId>
        <artifactId>struts2-parent</artifactId>
        <version>2.3.1</version>
    </parent>

    <groupId>org.apache.struts.xwork</groupId>
    <artifactId>xwork-core</artifactId>
    <packaging>jar</packaging>
    <name>XWork: Core</name>


    <scm>
        <connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_1/xwork-core</connection>
        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_1/xwork-core</developerConnection>
        <url>http://svn.apache.org/repos/asf/struts/struts2/tags/STRUTS_2_3_1/xwork-core</url>
    </scm>

    <properties>
        <currentVersion>${project.version}</currentVersion>
    </properties>

    <profiles>
        <profile>
            <!--
                   Run the translator for Java 1.4 compatiblity

                   OS/X Sample:
                   $ cd xwork/
                   $ mvn clean install -Pj4 -Djava14.jar=$JAVA_HOME/../Classes/classes.jar

                -->
            <id>j4</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>retrotranslator-maven-plugin</artifactId>
                        <version>1.0-alpha-4</version>
                        <executions>
                            <execution>
                                <phase>package</phase>
                                <goals>
                                    <goal>translate-project</goal>
                                </goals>
                                <configuration>
                                    <verify>false</verify>
                                    <failonwarning>true</failonwarning>
                                    <lazy>true</lazy>
                                    <advanced>true</advanced>
                                    <verbose>false</verbose>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
            <!--
            <dependencies>
                <dependency>
                    <groupId>sun.jdk</groupId>
                    <artifactId>rt</artifactId>
                    <version>1.4.0</version>
                    <scope>system</scope>
                    <systemPath>${java14.jar}</systemPath>
                </dependency>
                <dependency>
                    <groupId>net.sf.retrotranslator</groupId>
                    <artifactId>retrotranslator-runtime</artifactId>
                    <version>1.2.1</version>
                </dependency>
                <dependency>
                    <groupId>net.sf.retrotranslator</groupId>
                    <artifactId>retrotranslator-transformer</artifactId>
                    <version>1.2.1</version>
                </dependency>
            </dependencies>
            -->
        </profile>
    </profiles>

    <build>
        <sourceDirectory>${basedir}/src/main/java</sourceDirectory>
        <testSourceDirectory>${basedir}/src/test/java</testSourceDirectory>
        <resources>
            <resource>
                <directory>${basedir}/src/main/resources</directory>
            </resource>
        </resources>
        <testResources>
            <testResource>
                <directory>${basedir}/src/test/resources</directory>
            </testResource>
        </testResources>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.6</version>
                <configuration>
                    <properties>
                        <property>
                            <name>maven.testng.output.dir</name>
                            <value>${project.basedir}/target/surefire-reports</value>
                        </property>
                    </properties>
                    <useSystemClassLoader>false</useSystemClassLoader>
                    <additionalClasspathElements>
                        <element>${project.build.testOutputDirectory}/xwork-jar.jar</element>
                        <element>${project.build.testOutputDirectory}/xwork-zip.zip</element>
                        <element>${project.build.testOutputDirectory}/xwork - jar.jar</element>
                        <element>${project.build.testOutputDirectory}/xwork - zip.zip</element>
                    </additionalClasspathElements>
                    <includes>
                        <include>**/*Test.java</include>
                    </includes>
                    <excludes>
                        <exclude>**/XWorkTestCase.java</exclude>
                        <exclude>**/TestBean.java</exclude>
                        <exclude>**/TestBean2.java</exclude>
                        <exclude>**/TestInterceptor.java</exclude>
                        <exclude>**/AnnotatedTestBean.java</exclude>
                        <exclude>**/ContainerImplTest.java</exclude>
                        <exclude>**/URLUtilTest.java</exclude>
                    </excludes>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>cobertura-maven-plugin</artifactId>
                <version>2.4</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>clean</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-jar-plugin</artifactId>
                <configuration>
                    <archive>
                        <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
                    </archive>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <configuration>
                    <instructions>
                        <Export-Package>com.opensymphony.xwork2.*</Export-Package>
                    </instructions>
                </configuration>
                <executions>
                    <execution>
                        <id>bundle-manifest</id>
                        <phase>process-classes</phase>
                        <goals>
                            <goal>manifest</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
        <defaultGoal>install</defaultGoal>
    </build>

    <dependencies>
        <dependency>
            <groupId>commons-logging</groupId>
            <artifactId>commons-logging</artifactId>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>commons-lang</groupId>
            <artifactId>commons-lang</artifactId>
        </dependency>
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>ognl</groupId>
            <artifactId>ognl</artifactId>
        </dependency>
        <dependency>
            <groupId>asm</groupId>
            <artifactId>asm</artifactId>
        </dependency>
        <dependency>
            <groupId>asm</groupId>
            <artifactId>asm-commons</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-core</artifactId>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-aop</artifactId>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-aspects</artifactId>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-beans</artifactId>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context</artifactId>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context-support</artifactId>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-web</artifactId>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-test</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>cglib</groupId>
            <artifactId>cglib-nodep</artifactId>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <optional>true</optional>
        </dependency>

        <dependency>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
            <optional>true</optional>
            <classifier>jdk15</classifier>
        </dependency>

        <dependency>
            <groupId>mockobjects</groupId>
            <artifactId>mockobjects-core</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.easymock</groupId>
            <artifactId>easymock</artifactId>
            <scope>test</scope>
        </dependency>

    </dependencies>

</project>
