<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.distribution</groupId>
    <artifactId>nuxeo-distribution</artifactId>
    <version>5.5.0-HF19</version>
    <relativePath>../pom.xml</relativePath>
  </parent>

  <artifactId>nuxeo-distribution-tomcat</artifactId>
  <packaging>pom</packaging>
  <name>Nuxeo Tomcat Build</name>
  <description>Package Nuxeo with Tomcat</description>

  <dependencies>
    <dependency>
      <groupId>org.nuxeo.runtime</groupId>
      <artifactId>nuxeo-runtime-jtajca</artifactId>
    </dependency>
    <dependency>
      <groupId>org.nuxeo.runtime</groupId>
      <artifactId>nuxeo-runtime-datasource</artifactId>
    </dependency>
    <dependency>
      <groupId>org.nuxeo.runtime</groupId>
      <artifactId>nuxeo-runtime-tomcat-adapter</artifactId>
    </dependency>
    <dependency>
      <groupId>org.nuxeo.ecm.platform</groupId>
      <artifactId>nuxeo-platform-ws-sun-jaxws</artifactId>
    </dependency>
  </dependencies>

  <profiles>
    <profile>
      <id>all-distributions</id>
      <!-- profile for building all classifiers -->
    </profile>
    <profile>
      <id>all</id>
      <!-- profile for building all classifiers -->
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
    </profile>
    <profile>
      <id>nuxeo-coreserver</id>
      <!-- profile for building Tomcat with only Nuxeo CoreServer -->
      <properties>
        <product.name>coreserver</product.name>
      </properties>
    </profile>
    <profile>
      <id>nuxeo-cap</id>
      <properties>
        <product.name>cap</product.name>
      </properties>
      <!-- profile for building Tomcat with only Nuxeo CAP -->
    </profile>
    <profile>
      <id>sdk</id>
      <!-- profile for building SDK distributions (they are always built when release
        profile is activated) -->
    </profile>
    <profile>
      <id>release</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.jboss.tattletale</groupId>
            <artifactId>tattletale-maven</artifactId>
            <configuration>
              <source>${project.build.directory}/nuxeo-cap-${project.version}-tomcat/nxserver/lib</source>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>qa</id>
      <distributionManagement>
        <snapshotRepository>
          <id>daily-snapshots</id>
          <url>dav:http://maven.in.nuxeo.com/nexus/content/repositories/daily-snapshots</url>
          <uniqueVersion>true</uniqueVersion>
        </snapshotRepository>
      </distributionManagement>
    </profile>
    <profile>
      <id>qapriv</id>
      <distributionManagement>
        <repository>
          <id>releases</id>
          <url>dav:http://mavenpriv.in.nuxeo.com/nexus/content/repositories/releases</url>
        </repository>
        <snapshotRepository>
          <id>snapshots</id>
          <url>dav:http://mavenpriv.in.nuxeo.com/nexus/content/repositories/snapshots</url>
          <uniqueVersion>true</uniqueVersion>
        </snapshotRepository>
      </distributionManagement>
    </profile>
  </profiles>

  <build>
    <plugins>
      <plugin>
        <groupId>org.nuxeo.build</groupId>
        <artifactId>nuxeo-distribution-tools</artifactId>
        <configuration>
          <buildFiles>
            <buildFile>${basedir}/src/main/assemble/assembly.xml</buildFile>
          </buildFiles>
        </configuration>
        <executions>
          <execution>
            <id>packaging</id>
            <goals>
              <goal>build</goal>
            </goals>
            <phase>package</phase>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

</project>