<?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.nuxeo.ecm.platform</groupId>
    <artifactId>nuxeo-features-parent</artifactId>
    <version>7.10</version>
  </parent>
  
  <groupId>fr.openwide.nuxeo.commons</groupId>
  <artifactId>owsi-nuxeo-commons</artifactId>
  <version>1.7.10</version>
  <packaging>pom</packaging>
  
  <name>Open Wide : Nuxeo Commons</name>
  <description>Reusable resources for Nuxeo projects</description>
  <url>https://github.com/Open-Wide/owsi-nuxeo-commons</url>

  <scm>
    <connection>https://github.com/Open-Wide/owsi-nuxeo-commons.git</connection>
    <developerConnection>scm:git:https://github.com/Open-Wide/owsi-nuxeo-commons.git</developerConnection>
    <url>https://github.com/Open-Wide/owsi-nuxeo-commons</url>
  </scm>
  
  <licenses>
    <license>
      <name>GNU Lesser General Public License 2.1</name>
      <url>http://www.gnu.org/licenses/lgpl-2.1.html</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
  
  <developers>
    <developer>
      <id>schambon</id>
      <name>Sylvain Chambon</name>
      <organization>Open Wide</organization>
    </developer>
    <developer>
      <id>mkalam-alami</id>
      <name>Marwane Kalam-Alami</name>
      <organization>Open Wide</organization>
    </developer>
  </developers>
  
  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <java.version>1.8</java.version><!-- required by Nuxeo starting from 7.10 -->
    <jackson.version>1.8.1</jackson.version>
    <additionalparam>-Xdoclint:none</additionalparam><!-- disable Java 8 Javadoc restrictions -->
  </properties>

  <modules>
    <module>owsi-nuxeo-core/owsi-nuxeo-constants</module>
    <module>owsi-nuxeo-core/owsi-nuxeo-tests-helper</module>
    <module>owsi-nuxeo-core/owsi-nuxeo-utils</module>
    <module>owsi-nuxeo-core/owsi-nuxeo-rest</module>
    <module>owsi-nuxeo-core/owsi-nuxeo-rest-mock</module>
    <module>owsi-nuxeo-features/owsi-nuxeo-property-sync</module>
    <module>owsi-nuxeo-features/owsi-nuxeo-generic-properties</module>
    <module>owsi-nuxeo-features/owsi-nuxeo-avatar-importer</module>
    <module>owsi-nuxeo-features/owsi-nuxeo-document-creation-script</module>
    <module>owsi-nuxeo-features/owsi-nuxeo-ecm-types-ordering</module>
    <module>owsi-nuxeo-features/owsi-nuxeo-field-formatter</module>
  </modules>

  <dependencies>
    <!-- Common dependencies -->
    <dependency>
      <groupId>org.nuxeo.ecm.core</groupId>
      <artifactId>nuxeo-core-api</artifactId>
    </dependency>
    <dependency>
      <groupId>log4j</groupId>
      <artifactId>log4j</artifactId>
    </dependency>
    
    <!-- Common dependencies for tests -->
    <dependency>
      <groupId>org.nuxeo.runtime</groupId>
      <artifactId>nuxeo-runtime-test</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.nuxeo.ecm.core</groupId>
      <artifactId>nuxeo-core-test</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.nuxeo.ecm.platform</groupId>
      <artifactId>nuxeo-features-test</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.nuxeo.ecm.platform</groupId>
      <artifactId>nuxeo-platform-test</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.google.inject</groupId>
      <artifactId>guice</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <dependencyManagement>
    <dependencies>
      <!-- Open Wide projects -->
      <dependency>
        <groupId>fr.openwide.nuxeo.commons</groupId>
        <artifactId>owsi-nuxeo-tests-helper</artifactId>
        <version>${project.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>fr.openwide.nuxeo.commons</groupId>
        <artifactId>owsi-nuxeo-constants</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>fr.openwide.nuxeo.commons</groupId>
        <artifactId>owsi-nuxeo-utils</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>fr.openwide.nuxeo.commons</groupId>
        <artifactId>owsi-nuxeo-rest</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>fr.openwide.nuxeo.commons</groupId>
        <artifactId>owsi-nuxeo-rest-mock</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>fr.openwide.nuxeo.commons</groupId>
        <artifactId>owsi-nuxeo-property-sync</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>fr.openwide.nuxeo.commons</groupId>
        <artifactId>owsi-nuxeo-generic-properties</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>fr.openwide.nuxeo.commons</groupId>
        <artifactId>owsi-nuxeo-avatar-importer</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>fr.openwide.nuxeo.commons</groupId>
        <artifactId>owsi-nuxeo-document-creation-script</artifactId>
        <version>${project.version}</version>
      </dependency>
      
      <!-- REST (others are already defined in Nuxeo) -->
      <dependency>
        <groupId>org.codehaus.jackson</groupId>
        <artifactId>jackson-jaxrs</artifactId><!-- brings JacksonJsonProvider, to be configured in clients
        (NOT required if custom impls of MessageBodyReader etc.) -->
        <version>${jackson.version}</version>
      </dependency>
    </dependencies>
  </dependencyManagement>


  <!-- ======= -->
  <!-- Plugins -->
  <!-- ======= -->
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <source>${java.version}</source>
          <target>${java.version}</target>
        </configuration>
      </plugin>
      <!-- Use META-INF/MANIFEST.MF -->
      <!-- plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <configuration>
          <archive>
            <manifestFile>src/main/resources/META-INF/MANIFEST.MF</manifestFile>
          </archive>
        </configuration>
      </plugin -->
    </plugins>

    <!-- ================= -->
    <!-- Plugin management -->
    <!-- ================= -->
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>2.3</version>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>


  <repositories>
    <!-- Nuxeo repositories -->
    <repository>
      <id>nuxeo-public</id>
      <url>http://maven.nuxeo.org/nexus/content/groups/public</url>
      <releases>
        <enabled>true</enabled>
      </releases>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
    </repository>
    <repository>
      <id>nuxeo-public-snapshots</id>
      <url>http://maven.nuxeo.org/nexus/content/groups/public-snapshot</url>
      <releases>
        <enabled>false</enabled>
      </releases>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
    </repository>
  </repositories>
  
  <distributionManagement>
    <repository>
      <id>sonatype-nexus-staging</id>
      <url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
    </repository>
    <snapshotRepository>
      <id>sonatype-nexus-snapshots</id>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
    </snapshotRepository>
  </distributionManagement>

  <profiles>
    <profile>
      <id>release</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>1.1</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
            <configuration>
              <keyname>0F52BAFE</keyname><!-- Marwane Kalam-Alami -->
             <!-- <keyname>B4235B0A</keyname>Marc Dutoo -->
            </configuration>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <executions>
              <execution>
                <id>attach-sources</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
