<?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.exoplatform.ecms</groupId>
    <artifactId>exo-ecms-core</artifactId>
    <version>2.3.12</version>
  </parent>
  <artifactId>exo-ecms-core-connector</artifactId>
  <packaging>jar</packaging>
  <name>eXo DMS FCKEditor Connector</name>
  <description>eXo FCKConnector Service</description>
  <dependencies>
    <dependency>
      <groupId>org.exoplatform.kernel</groupId>
      <artifactId>exo.kernel.container</artifactId>
      <version>${org.exoplatform.kernel.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.exoplatform.core</groupId>
      <artifactId>exo.core.component.security.core</artifactId>
      <version>${org.exoplatform.core.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.exoplatform.jcr</groupId>
      <artifactId>exo.jcr.component.core</artifactId>
      <version>${org.exoplatform.jcr.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.exoplatform.jcr</groupId>
      <artifactId>exo.jcr.component.ext</artifactId>
      <version>${org.exoplatform.jcr.version}</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.exoplatform.portal</groupId>
      <artifactId>exo.portal.component.portal</artifactId>
      <version>${org.exoplatform.portal.version}</version>
    </dependency>
    <dependency>
      <groupId>org.exoplatform.ecms</groupId>
      <artifactId>exo-ecms-core-services</artifactId>
      <version>${project.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.exoplatform.ecms</groupId>
      <artifactId>exo-ecms-core-publication</artifactId>
      <version>${project.version}</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.exoplatform.portal</groupId>
      <artifactId>exo.portal.webui.core</artifactId>
      <version>${org.exoplatform.portal.version}</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>com.ibm.icu</groupId>
      <artifactId>icu4j</artifactId>
      <version>${icu4j.version}</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
     <groupId>org.exoplatform.doc</groupId>
     <artifactId>doc-style</artifactId>
     <version>${org.exoplatform.doc.doc-style.version}</version>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>org.exoplatform.doc</groupId>
      <artifactId>doc-style</artifactId>
      <version>${org.exoplatform.doc.doc-style.version}</version>
      <classifier>templates</classifier>
    </dependency>    
  </dependencies>
  <build>
    <resources>
      <resource>
        <directory>src/main/java</directory>
        <includes>
          <include>**/*.xml</include>
          <include>**/*.properties</include>
          <include>**/*.xsl</include>
          <include>**/*.dtd</include>
        </includes>
      </resource>
      <resource>
        <directory>src/main/resources</directory>
        <includes>
          <include>**/*.properties</include>
          <include>**/*.xml</include>
          <include>**/*.drl</include>
          <include>**/*.vm</include>
          <include>**/*.doc</include>
          <include>**/*.xls</include>
          <include>**/*.ppt</include>
          <include>**/*.txt</include>
          <include>**/*.jar</include>
          <include>**/*.pom</include>
          <include>**/*.sha1</include>
          <include>**/*.conf</include>
          <include>**/*.gtmpl</include>
        </includes>
      </resource>
    </resources>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>2.3.2</version>
        <executions>
          <execution>
            <id>default-compile</id>
            <goals>
              <goal>compile</goal>
            </goals>
            <phase>compile</phase>
            <configuration>
              <compilerArguments>
                <sourcepath>${project.build.directory}/templates</sourcepath>
              </compilerArguments>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <version>2.1</version>
        <executions>
          <execution>
            <id>unpack-templates</id>
            <phase>generate-sources</phase>
            <goals>
              <goal>unpack-dependencies</goal>
            </goals>
            <configuration>
              <includeGroupIds>org.exoplatform.doc</includeGroupIds>
              <includeArtifactIds>doc-style</includeArtifactIds>
              <includeClassifiers>templates</includeClassifiers>
              <excludes>META-INF/**</excludes>
              <outputDirectory>${project.build.directory}/templates</outputDirectory>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>jar</goal>
            </goals>
            <configuration>
              <classifier>doc-jaxrs</classifier>
              <includes>
                <include>**/generated/*</include>
              </includes>
            </configuration>
          </execution>
        </executions>
      </plugin>
      
    </plugins>
  </build>
</project>
