<?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.0.3-SNAPSHOT</version>
    </parent>
    <groupId>org.apache.struts</groupId>
    <artifactId>struts2-core</artifactId>
    <packaging>jar</packaging>
    <name>Struts 2 Core</name>
    
    <scm>
       <connection>scm:svn:http://svn.apache.org/repos/asf/struts/struts2/trunk/core/</connection>
       <developerConnection>scm:svn:https://svn.apache.org/repos/asf/struts/struts2/trunk/core/</developerConnection>
       <url>http://svn.apache.org/viewcvs.cgi/struts/struts2/trunk/core/</url>
    </scm>

    <build>
        <plugins>
        	<plugin>
                <artifactId>maven-dependency-plugin</artifactId>
                <version>2.0-alpha-1-SNAPSHOT</version>
                <executions>
                    <execution>
                        <id>unpack-xwork</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>unpack</goal>
                        </goals>
                        <configuration>
		                    <artifactItems>
		                        <artifactItem>
		                            <groupId>opensymphony</groupId>
		                            <artifactId>xwork</artifactId>
		                            <version>2.0.0</version>
		                            <classifier>sources</classifier>
		                        </artifactItem>
		                    </artifactItems>
		                    <outputDirectory>${project.build.directory}/xwork-sources</outputDirectory>
		                </configuration>
                    </execution>
				</executions>
            </plugin>
            <plugin>
                <groupId>org.apache.myfaces.tobago</groupId>
                <artifactId>maven-apt-plugin</artifactId>
                <configuration>
                    <A>uri=/struts-tags,tlibVersion=2.2.3,jspVersion=1.2,shortName=s,displayName="Struts Tags",
                    outFile=${basedir}/src/main/resources/META-INF/struts-tags.tld,
                    description="To make it easier to access dynamic data;
                    the Apache Struts framework includes a library of custom tags.
                    The tags interact with the framework's validation and internationalization features;
                    to ensure that input is correct and output is localized.
                    The Struts Tags can be used with JSP FreeMarker or Velocity.",
                    outTemplatesDir=${basedir}/src/site/resources/tags
                    </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>
    
    <reporting>
        <plugins>
        	<plugin>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.2</version>
                <configuration>
                    <sourcepath>${basedir}/src/main/java;${basedir}/target/xwork-sources</sourcepath>
                    <encoding>UTF-8</encoding>
                    <groups>
                        <group>
                            <title>Struts Packages</title>
                            <packages>org.apache.struts2*</packages>
                        </group>
                        <group>
                            <title>XWork Packages</title>
                            <packages>com.opensymphony.xwork2*</packages>
                        </group>
                    </groups>
                    <show>private</show>
                    <links>
                        <link>http://java.sun.com/j2se/1.5.0/docs/api</link>
                        <link>http://java.sun.com/javaee/5/docs/api/</link>
                        <link>http://jakarta.apache.org/commons/logging/apidocs/</link>
                        <link>http://logging.apache.org/log4j/docs/api/</link>
                    </links>
                </configuration>
            </plugin>
        </plugins>
    </reporting>
    
    <profiles>
     	<profile>
	    	<!-- 
	    		Run the translator for Java 1.4 compatiblity
	    		
	    		Sample:
	    		$ cd struts/struts2/
	    		$ mvn clean install -Papps,j4 -Djava14.jar=$JAVA_HOME/../Classes/classes.jar
	    	
	    	 -->
	      <id>j4</id>
	      <build>
	        <plugins>
	          <plugin>
	            <groupId>org.codehaus.mojo</groupId>
	            <artifactId>retrotranslator-maven-plugin</artifactId>
	            <executions>
	              <execution>
	                <id>retrotranslate</id>
	              </execution>
	            </executions>
	          </plugin>
	          <plugin>
	            <artifactId>maven-jar-plugin</artifactId>
	            <executions>
	              <execution>
	                <id>create-j4-jar</id>
	                <goals><goal>jar</goal></goals>
	                <configuration>
	                  <classesDirectory>${project.build.directory}/classes-retro</classesDirectory>
	                  <classifier>j4</classifier>
	                  <archive>
	                    <manifestEntries>
	                      <Extension-Name>${project.artifactId}-j4</Extension-Name>
	                      <Specification-Vendor>${project.organization.name}</Specification-Vendor>
	                      <Implementation-Vendor>${project.organization.name}</Implementation-Vendor>
	                      <Implementation-Title>${project.description}</Implementation-Title>
	                      <Implementation-Version>${project.version}</Implementation-Version>
	                      <Revision>${scm.revision}</Revision>
	                    </manifestEntries>
	                   </archive>
	                </configuration>
	              </execution>
	            </executions>
	          </plugin>
	        </plugins>
	      </build>
	       <dependencies>
	        <dependency>
	          <groupId>sun.jdk</groupId>
	          <artifactId>rt</artifactId>
	          <version>1.4.0</version>
	          <scope>system</scope>
	          <!-- path to rt.jar (on OSX, it's classes.jar) -->
	          <systemPath>${java14.jar}</systemPath>
	        </dependency>
	        <dependency>
	          <groupId>net.sf.retrotranslator</groupId>
	          <artifactId>retrotranslator-runtime</artifactId>
	          <version>1.0.8</version>
	        </dependency>
	      </dependencies>
	    </profile>
        
        <profile>
            <id>alljars</id>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>2.2</version>
                        <executions>
                            <execution>
                                <id>attach-source</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <sourcepath>${basedir}/src/main/java;${basedir}/target/xwork-sources</sourcepath>
                            <encoding>UTF-8</encoding>
                            <groups>
                                <group>
                                    <title>Struts Packages</title>
                                    <packages>org.apache.struts2*</packages>
                                </group>
                                <group>
                                    <title>XWork Packages</title>
                                    <packages>com.opensymphony.xwork2*</packages>
                                </group>
                            </groups>
                            <show>private</show>
                            <links>
                                <link>http://java.sun.com/j2se/1.5.0/docs/api</link>
                                <link>http://java.sun.com/javaee/5/docs/api/</link>
                                <link>http://jakarta.apache.org/commons/logging/apidocs/</link>
                                <link>http://logging.apache.org/log4j/docs/api/</link>
                            </links>
                        </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>default-tools.jar</id>
            <activation>
                <property>
                    <name>java.vendor</name>
                    <value>Sun Microsystems Inc.</value>
                </property>
            </activation>
            <dependencies>
                <dependency>
                    <groupId>com.sun</groupId>
                    <artifactId>tools</artifactId>
                    <version>1.5.0</version>
                    <scope>system</scope>
                    <systemPath>${java.home}/../lib/tools.jar</systemPath>
                </dependency>
            </dependencies>
        </profile>

    </profiles>
 
    
    <dependencies>
        <dependency>
            <groupId>opensymphony</groupId>
            <artifactId>xwork</artifactId>
            <version>2.0.0</version>
        </dependency>

        <dependency>
            <groupId>org.apache.struts</groupId>
            <artifactId>struts2-api</artifactId>
            <version>${pom.version}</version>
        </dependency>
        
        <dependency>
            <groupId>freemarker</groupId>
            <artifactId>freemarker</artifactId>
            <version>2.3.4</version>
        </dependency>

        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>servlet-api</artifactId>
            <version>2.4</version>
            <scope>provided</scope>
        </dependency>

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

        <dependency>
            <groupId>ognl</groupId>
            <artifactId>ognl</artifactId>
            <version>2.6.9</version>
        </dependency>
 
        <dependency>
            <groupId>commons-logging</groupId>
            <artifactId>commons-logging</artifactId>
            <version>1.0.4</version>
        </dependency>

        <dependency>
            <groupId>commons-lang</groupId>
            <artifactId>commons-lang</artifactId>
            <version>2.0</version>
            <optional>true</optional>
        </dependency>

        <!-- Ajax -->
        <dependency>
            <groupId>uk.ltd.getahead</groupId>
            <artifactId>dwr</artifactId>
            <version>1.1-beta-3</version>
            <optional>true</optional>
        </dependency>

        <!-- Velocity -->
        <dependency>
            <groupId>velocity</groupId>
            <artifactId>velocity</artifactId>
            <version>1.4</version>
            <optional>true</optional>
        </dependency>

        <dependency>
            <groupId>velocity-tools</groupId>
            <artifactId>velocity-tools</artifactId>
            <version>1.1</version>
            <optional>true</optional>
        </dependency>

        <!-- File upload -->
        <dependency>
            <groupId>commons-fileupload</groupId>
            <artifactId>commons-fileupload</artifactId>
            <version>1.1.1</version>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <version>1.0</version>
            <optional>true</optional>
        </dependency>

        <dependency>
            <groupId>commons-lang</groupId>
            <artifactId>commons-lang</artifactId>
            <version>2.1</version>
            <optional>true</optional>
        </dependency>

        <!-- Portlet -->
        <dependency>
            <groupId>portlet-api</groupId>
            <artifactId>portlet-api</artifactId>
            <version>1.0</version>
            <optional>true</optional>
        </dependency>

        <dependency>
            <groupId>org.apache.pluto</groupId>
            <artifactId>pluto</artifactId>
            <version>1.0.1-rc4</version>
            <optional>true</optional>
        </dependency>

        <!-- Mocks for unit testing (by Spring) -->
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-mock</artifactId>
            <version>1.2.8</version>
            <optional>true</optional>
        </dependency>

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



        <!-- Test dependencies -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>compile</scope>
            <version>3.8.1</version>
            <!-- has to be compile for StrutsTestCase, which is part of the base package so others can write unit tests -->
            <optional>true</optional>
        </dependency>

        <dependency>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
            <version>5.1</version>
            <optional>true</optional>
            <classifier>jdk15</classifier>
        </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>

        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>1.2.9</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.struts</groupId>
            <artifactId>struts-annotations</artifactId>
            <version>1.0-SNAPSHOT</version>
            <scope>compile</scope>
        </dependency>

    </dependencies>
</project>
