<?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>
    <artifactId>calendar</artifactId>
    <groupId>org.exoplatform.calendar</groupId>
    <version>5.3.2-RC01</version>
  </parent>
  <artifactId>calendar-webservice</artifactId>
  <packaging>jar</packaging>
  <name>eXo PLF:: Calendar Webservice</name>
  <description>eXo Calendar Webservice</description>
  <properties>
    <exo.test.coverage.ratio>0.68</exo.test.coverage.ratio>
  </properties>
  <dependencies>
    <dependency>
      <groupId>commons-chain</groupId>
      <artifactId>commons-chain</artifactId>
    </dependency>
    <dependency>
      <groupId>commons-lang</groupId>
      <artifactId>commons-lang</artifactId>
    </dependency>
    <dependency>
      <groupId>javax.annotation</groupId>
      <artifactId>jsr250-api</artifactId>
    </dependency>
    <dependency>
      <groupId>javax.jcr</groupId>
      <artifactId>jcr</artifactId>
    </dependency>
    <dependency>
      <groupId>javax.ws.rs</groupId>
      <artifactId>jsr311-api</artifactId>
    </dependency>
    <!-- Log4J is required by wikbook to compile but we don't want to propagate it -->
    <dependency>
      <groupId>log4j</groupId>
      <artifactId>log4j</artifactId>
      <optional>true</optional>
    </dependency>
    <!-- This dependency is required to compile our main classes but is erroneously reported as useless by dependency:analyze -->
    <dependency>
      <groupId>org.exoplatform.calendar</groupId>
      <artifactId>calendar-service</artifactId>
      <exclusions>
        <exclusion>
          <artifactId>ant</artifactId>
          <groupId>org.apache.ant</groupId>
        </exclusion>
        <exclusion>
          <artifactId>ant-launcher</artifactId>
          <groupId>org.apache.ant</groupId>
        </exclusion>
        <exclusion>
          <artifactId>commons-logging</artifactId>
          <groupId>commons-logging</groupId>
        </exclusion>
        <exclusion>
          <artifactId>jdom</artifactId>
          <groupId>jdom</groupId>
        </exclusion>
        <exclusion>
          <artifactId>javax.servlet-api</artifactId>
          <groupId>javax.servlet</groupId>
        </exclusion>
        <exclusion>
          <artifactId>junit</artifactId>
          <groupId>junit</groupId>
        </exclusion>
        <exclusion>
          <artifactId>jdom</artifactId>
          <groupId>jdom</groupId>
        </exclusion>
        <exclusion>
          <artifactId>xpp3_min</artifactId>
          <groupId>xpp3</groupId>
        </exclusion>
        <exclusion>
          <artifactId>commons-beanutils-core</artifactId>
          <groupId>commons-beanutils</groupId>
        </exclusion>
        <exclusion>
          <artifactId>geronimo-stax-api_1.0_spec</artifactId>
          <groupId>org.apache.geronimo.specs</groupId>
        </exclusion>
        <exclusion>
          <artifactId>modules</artifactId>
          <groupId>rome</groupId>
        </exclusion>
        <exclusion>
          <artifactId>xmlParserAPIs</artifactId>
          <groupId>xerces</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.exoplatform.core</groupId>
      <artifactId>exo.core.component.organization.api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.exoplatform.core</groupId>
      <artifactId>exo.core.component.security.core</artifactId>
    </dependency>
    <!-- doc-style is required by wikbook to compile but we don't want to propagate it -->
    <dependency>
      <groupId>org.exoplatform.doc</groupId>
      <artifactId>doc-style</artifactId>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>org.exoplatform.jcr</groupId>
      <artifactId>exo.jcr.component.core</artifactId>
      <exclusions>
        <exclusion>
          <artifactId>xml-apis</artifactId>
          <groupId>xml-apis</groupId>
        </exclusion>
        <exclusion>
          <artifactId>xml-apis-ext</artifactId>
          <groupId>xml-apis</groupId>
        </exclusion>
        <exclusion>
          <artifactId>stax-api</artifactId>
          <groupId>javax.xml.stream</groupId>
        </exclusion>
        <exclusion>
          <artifactId>jboss-transaction-api</artifactId>
          <groupId>org.jboss.javaee</groupId>
        </exclusion>
        <exclusion>
          <artifactId>ow2-jta-1.1-spec</artifactId>
          <groupId>org.ow2.spec.ee</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.exoplatform.kernel</groupId>
      <artifactId>exo.kernel.commons</artifactId>
    </dependency>
    <dependency>
      <groupId>org.exoplatform.kernel</groupId>
      <artifactId>exo.kernel.component.command</artifactId>
      <exclusions>
        <exclusion>
          <artifactId>xml-apis</artifactId>
          <groupId>xml-apis</groupId>
        </exclusion>
        <exclusion>
          <artifactId>xml-apis-ext</artifactId>
          <groupId>xml-apis</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.exoplatform.kernel</groupId>
      <artifactId>exo.kernel.component.common</artifactId>
    </dependency>
    <dependency>
      <groupId>org.exoplatform.kernel</groupId>
      <artifactId>exo.kernel.container</artifactId>
      <exclusions>
        <exclusion>
          <artifactId>javax.servlet-api</artifactId>
          <groupId>javax.servlet</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.exoplatform.ws</groupId>
      <artifactId>exo.ws.rest.core</artifactId>
    </dependency>
    <dependency>
      <groupId>org.exoplatform.gatein.portal</groupId>
      <artifactId>exo.portal.component.common</artifactId>
    </dependency>
    <dependency>
      <groupId>org.exoplatform.commons</groupId>
      <artifactId>commons-component-common</artifactId>
    </dependency>
    <dependency>
      <groupId>org.quartz-scheduler</groupId>
      <artifactId>quartz</artifactId>
      <exclusions>
        <exclusion>
          <artifactId>commons-logging</artifactId>
          <groupId>commons-logging</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>rome</groupId>
      <artifactId>rome</artifactId>
    </dependency>
    <dependency>
      <groupId>com.googlecode.json-simple</groupId>
      <artifactId>json-simple</artifactId>
    </dependency>
    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>javax.servlet-api</artifactId>
      <scope>test</scope>
    </dependency>
    <!-- This dependency is used for tests execution but is erroneously reported as useless by mvn dependency:analyze -->
    <dependency>
      <groupId>org.chromattic</groupId>
      <artifactId>chromattic.core</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.exoplatform.tool</groupId>
      <artifactId>exo.tool.framework.junit</artifactId>
      <scope>test</scope>
    </dependency>
    <!-- This dependency is used for tests execution but is erroneously reported as useless by mvn dependency:analyze -->
    <dependency>
      <groupId>org.exoplatform.gatein.portal</groupId>
      <artifactId>exo.portal.component.identity</artifactId>
      <type>test-jar</type>
      <scope>test</scope>
    </dependency>
    <!-- This dependency is used for tests execution but is erroneously reported as useless by mvn dependency:analyze -->
    <dependency>
      <groupId>org.exoplatform.gatein.portal</groupId>
      <artifactId>exo.portal.component.portal</artifactId>
      <exclusions>
        <exclusion>
          <artifactId>stax-api</artifactId>
          <groupId>javax.xml.stream</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <!-- This dependency is used for tests execution but is erroneously reported as useless by mvn dependency:analyze -->
    <dependency>
      <groupId>org.exoplatform.gatein.portal</groupId>
      <artifactId>exo.portal.component.test.core</artifactId>
      <scope>test</scope>
    </dependency>
    <!-- This dependency is used for tests execution but is erroneously reported as useless by mvn dependency:analyze -->
    <dependency>
      <groupId>org.exoplatform.gatein.portal</groupId>
      <artifactId>exo.portal.component.test.jcr</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.exoplatform.commons</groupId>
      <artifactId>commons-testing</artifactId>
      <scope>test</scope>
    </dependency>
    <!-- This dependency is used for tests execution but is erroneously reported as useless by mvn dependency:analyze -->
    <dependency>
      <groupId>org.hsqldb</groupId>
      <artifactId>hsqldb</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>jcl-over-slf4j</artifactId>
      <scope>test</scope>
    </dependency>
    <!-- This dependency is used for tests execution but is erroneously reported as useless by mvn dependency:analyze -->
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-simple</artifactId>
      <scope>test</scope>
    </dependency>
    <!-- Swagger -->
    <dependency>
      <groupId>io.swagger</groupId>
      <artifactId>swagger-jaxrs</artifactId>
      <version>1.5.0</version>
    </dependency>
  </dependencies>
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <executions>
          <execution>
            <id>default-compile</id>
            <phase>compile</phase>
            <goals>
              <goal>compile</goal>
            </goals>
            <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>
        <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>
              <excludes>META-INF/**</excludes>
              <outputDirectory>${project.build.directory}/templates</outputDirectory>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>add-source</id>
            <phase>prepare-package</phase>
            <goals>
              <goal>add-source</goal>
            </goals>
            <configuration>
              <sources>
                <source>${project.build.directory}/generated-sources/annotations</source>
              </sources>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>com.github.kongchen</groupId>
        <artifactId>swagger-maven-plugin</artifactId>
        <version>3.1.0</version>
        <executions>
          <execution>
            <phase>compile</phase>
            <goals>
              <goal>generate</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <apiSources>
            <apiSource>
              <springmvc>false</springmvc>
              <locations>org.exoplatform.calendar.ws</locations>
              <schemes>http,https</schemes>
              <host>localhost:8080</host>
              <basePath>/rest/private/v1/calendar</basePath>
              <info>
                <title>Calendar</title>
                <version>1</version>
                <description>Calendar REST API documentation</description>
                <termsOfService>https://github.com/exoplatform/calendar</termsOfService>
                <contact>
                  <name>eXo Platform</name>
                  <url>http://www.exoplatform.org</url>
                  <email>exo-engineering@exoplatform.com</email>
                </contact>
                <license>
                  <url>http://www.gnu.org/licenses</url>
                  <name>GNU Affero General Public License</name>
                </license>
              </info>
              <templatePath>${basedir}/src/main/resources/swagger-doc-template/strapdown.html.hbs</templatePath>
              <outputPath>${basedir}/target/generated/document.html</outputPath>
              <swaggerDirectory>${basedir}/target/generated/swagger-ui</swaggerDirectory>
            </apiSource>
          </apiSources>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>
