<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>
    <artifactId>alfresco-remote-api</artifactId>
    <name>Alfresco Remote API</name>
    <parent>
        <artifactId>alfresco-parent</artifactId>
        <groupId>org.alfresco</groupId>
        <version>5.2.f</version>
        <relativePath>../../pom.xml</relativePath>
    </parent>

    <dependencies>
        <dependency>
            <groupId>org.alfresco</groupId>
            <artifactId>alfresco-repository</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.ws.security</groupId>
            <artifactId>wss4j</artifactId>
            <version>1.6.19</version>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-csv</artifactId>
            <version>20110211</version>
        </dependency>
        <dependency>
            <groupId>javax.portlet</groupId>
            <artifactId>portlet-api</artifactId>
            <version>2.0</version>
        </dependency>
        <dependency>
            <groupId>org.alfresco.surf</groupId>
            <artifactId>spring-webscripts</artifactId>
        </dependency>
        <dependency>
            <groupId>org.alfresco.cmis.client</groupId>
            <artifactId>alfresco-opencmis-extension</artifactId>
            <version>1.1</version>
        </dependency>
        <dependency>
            <groupId>org.apache.ws.xmlschema</groupId>
            <artifactId>xmlschema-core</artifactId>
             <version>2.2.1</version>
        </dependency>
        <dependency>
            <groupId>javax.xml</groupId>
            <artifactId>jaxrpc-api</artifactId>
            <version>1.1</version>
        </dependency>
        <dependency>
            <groupId>rome</groupId>
            <artifactId>rome</artifactId>
            <version>1.0</version>
        </dependency>

        <!-- This is needed at runtime by Web Client, so not really a test dependency -->
        <dependency>
            <groupId>org.apache.chemistry.opencmis</groupId>
            <artifactId>chemistry-opencmis-test-tck</artifactId>
            <version>${dependency.opencmis.version}</version>
            <!-- <scope>test</scope> -->
            <exclusions>
                <exclusion>
                    <groupId>org.apache.chemistry.opencmis</groupId>
                    <artifactId>chemistry-opencmis-client-impl</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.apache.chemistry.opencmis</groupId>
            <artifactId>chemistry-opencmis-client-impl</artifactId>
            <version>${dependency.opencmis.version}</version>
        </dependency>

        <!-- Test dependencies -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-all</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-test</artifactId>
            <version>${dependency.spring.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.alfresco</groupId>
            <artifactId>alfresco-repository</artifactId>
            <version>${project.version}</version>
            <classifier>tests</classifier>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.alfresco.surf</groupId>
            <artifactId>spring-webscripts</artifactId>
            <classifier>tests</classifier>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.postgresql</groupId>
            <artifactId>postgresql</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.h2database</groupId>
            <artifactId>h2</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-server</artifactId>
            <version>7.3.0.v20110203</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-security</artifactId>
            <version>7.3.0.v20110203</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-webapp</artifactId>
            <version>7.3.0.v20110203</version>
            <scope>test</scope>
        </dependency>
    </dependencies>
   <profiles>
      <profile>
            <id>integration-tests</id>
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
            <build>
                <plugins>
                  <plugin>
                     <artifactId>maven-surefire-plugin</artifactId>
                     <executions>
                        <execution>
                           <id>integration-tests</id>
                           <goals>
                              <goal>test</goal>
                           </goals>
                           <configuration>
                              <forkMode>always</forkMode>
                              <includes combine.self="override">
                                 <include>**/org/alfresco/RemoteApi*TestSuite.java</include>
                                 <include>**/org/alfresco/repo/webdav/PutMethodTest.java</include>
                                 <include>**/org/alfresco/repo/webdav/WebDAVonContentUpdateTest.java</include>
                              </includes>
                           </configuration>
                        </execution>
                     </executions>
                  </plugin>
                </plugins>
            </build>
        </profile>
   </profiles>
   <build>
        <plugins>
            <plugin>
               <artifactId>maven-surefire-plugin</artifactId>
               <executions>
                  <execution>
                     <id>default-test</id>
                     <!-- There's also surefire configuration in the integration-tests profile -->
                     <configuration>
                          <includes>
                              <include>**/org/alfresco/remoteapi/AllUnitTestsSuite.java</include>
                          </includes>
                     </configuration>
                  </execution>
               </executions>
            </plugin>

            <!-- We still use committed generated sources -->
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>add-source</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>add-source</goal>
                        </goals>
                        <configuration>
                            <sources>
                                <source>source/generated</source>
                            </sources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <!-- ACE-3329 Create _en.properties message files  -->
            <plugin>
                <artifactId>maven-antrun-plugin</artifactId>
                 <executions>
                    <execution>
                        <id>duplicate-english-messages</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>run</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <target>
                        <copy todir="${project.build.outputDirectory}">
                            <fileset dir="${basedir}/config"
                                includes="alfresco/messages/**/*.properties,alfresco/templates/webscripts/**/*.properties" />
                            <mapper type="regexp" from="^([^_]*).properties$" to="\1_en.properties"/>
                        </copy>
                    </target>
                </configuration>
            </plugin>
        </plugins>
    </build>

</project>
