<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>
    <packaging>jar</packaging>

    <parent>
        <groupId>org.alfresco</groupId>
        <artifactId>alfresco-community-repo</artifactId>
        <version>20.45-DEV</version>
    </parent>

    <dependencies>
        <dependency>
            <groupId>org.alfresco</groupId>
            <artifactId>alfresco-repository</artifactId>
            <version>${project.version}</version>
        </dependency>

        <!-- Jakarta... -->
        <dependency>
            <groupId>jakarta.xml.rpc</groupId>
            <artifactId>jakarta.xml.rpc-api</artifactId>
        </dependency>

        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-core</artifactId>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-annotations</artifactId>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-csv</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.santuario</groupId>
            <artifactId>xmlsec</artifactId>
            <version>3.0.0</version>
        </dependency>
        <!-- newer version, see REPO-3133 -->
        <dependency>
            <groupId>org.alfresco.surf</groupId>
            <artifactId>spring-webscripts</artifactId>
        </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>
            <exclusions>
                <!-- REPO-5009 Excluded to avoid duplicated classes with javax.jws:javax.jws-api -->
                <exclusion>
                  <groupId>org.apache.geronimo.specs</groupId>
                  <artifactId>geronimo-ws-metadata_2.0_spec</artifactId>
                </exclusion>
                <!-- Duplicates classes from jakarta.transaction:jakarta.transaction-api -->
                <exclusion>
                    <groupId>org.apache.geronimo.specs</groupId>
                    <artifactId>geronimo-jta_1.1_spec</artifactId>
                </exclusion>
            </exclusions>
            <!-- <scope>test</scope> -->
        </dependency>
        <!-- the cxf libs were updated, see dependencyManagement section -->


        <!-- Test dependencies -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.assertj</groupId>
            <artifactId>assertj-core</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-test</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jsoup</groupId>
            <artifactId>jsoup</artifactId>
            <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</groupId>
            <artifactId>alfresco-core</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>org.postgresql</groupId>
            <artifactId>postgresql</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-server</artifactId>
            <version>10.0.11</version>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.eclipse.jetty.orbit</groupId>
                    <artifactId>javax.servlet</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-security</artifactId>
            <version>10.0.11</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-webapp</artifactId>
            <version>10.0.11</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.alfresco.cmis.client</groupId>
            <artifactId>alfresco-opencmis-extension</artifactId>
            <version>2.1</version>
            <scope>test</scope>
            <exclusions>
              <!-- Duplicates classes from jakarta.transaction:jakarta.transaction-api -->
              <exclusion>
                <groupId>org.apache.geronimo.specs</groupId>
                <artifactId>geronimo-jta_1.1_spec</artifactId>
              </exclusion>
              <!-- REPO-5009 Excluded to avoid duplicated classes with javax.jws:javax.jws-api -->
              <exclusion>
                <groupId>org.apache.geronimo.specs</groupId>
                <artifactId>geronimo-ws-metadata_2.0_spec</artifactId>
              </exclusion>
              <!-- MNT-20557: Excluding javax.annotation:javax.annotation-api, jakarta.annotation:jakarta.annotation-api will be used instead -->
              <exclusion>
                  <groupId>javax.annotation</groupId>
                  <artifactId>javax.annotation-api</artifactId>
              </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-mock</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>
    <build>
        <plugins>
            <!-- Create a jar of test classes -->
            <plugin>
                <artifactId>maven-jar-plugin</artifactId>
                <executions>
                    <execution>
                        <id>create-test-jar</id>
                        <goals>
                            <goal>test-jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <executions>
                    <execution>
                        <id>default-test</id>
                        <configuration>
                            <!-- To prevent tests alfresco.log to be created in project roots and bother while synchronizing with SCM -->
                            <workingDirectory>${project.build.directory}</workingDirectory>
                            <systemPropertyVariables>
                                <!-- Database related properties -->
                                <db.url>${db.url}</db.url>
                                <db.driver>${db.driver}</db.driver>
                                <db.name>${db.name}</db.name>
                                <db.username>${db.username}</db.username>
                                <db.password>${db.password}</db.password>
                                <dir.root>${dir.root}</dir.root>
                                <!-- BDE-91 -->
                                <alfresco.rmi.services.retries>30</alfresco.rmi.services.retries>
                                <alfresco.rmi.services.retryInterval>2000</alfresco.rmi.services.retryInterval>
                                <!-- FTR used in TransferWebScriptTest -->
                                <transferservice.receiver.enabled>true</transferservice.receiver.enabled>
                            </systemPropertyVariables>
                        </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>src/main/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}/src/main/resources" includes="alfresco/messages/**/*.properties,alfresco/templates/webscripts/**/*.properties" />
                            <mapper type="regexp" from="^([^_]*).properties$" to="\1_en.properties" />
                        </copy>
                    </target>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>check-licenses</id>
                        <phase>compile</phase>
                        <goals>
                            <goal>check-file-header</goal>
                        </goals>
                        <configuration>
                            <addJavaLicenseAfterPackage>false</addJavaLicenseAfterPackage>
                            <organizationName>Alfresco Software Limited</organizationName>
                            <failOnMissingHeader>true</failOnMissingHeader>
                            <failOnNotUptodateHeader>true</failOnNotUptodateHeader>
                            <licenseResolver>classpath://alfresco</licenseResolver>
                            <licenseName>${licenseName}</licenseName>
                            <roots>
                                <root>src</root>
                            </roots>
                            <includes>
                                <include>**/*.java</include>
                                <include>**/*.jsp</include>
                            </includes>
                        </configuration>
                    </execution>
                </executions>
                <dependencies>
                    <dependency>
                        <groupId>org.alfresco</groupId>
                        <artifactId>alfresco-license-headers</artifactId>
                        <version>1.0</version>
                    </dependency>
                </dependencies>
            </plugin>
        </plugins>
    </build>

</project>
