<?xml version="1.0"?>
<project
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
    xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>org.jbpm.contrib</groupId>
    <artifactId>workitems</artifactId>
    <version>7.9.0.Final</version>
  </parent>

  <artifactId>repository</artifactId>
  <name>Repository</name>
  <description>Workitems Repository</description>
  <organization>
    <name>jBPM dev team</name>
  </organization>
  <packaging>jar</packaging>

  <build>
    <resources>
      <resource>
        <directory>${project.build.directory}/maven-shared-archive-resources</directory>
        <filtering>true</filtering>
        <includes>
          <include>*.html</include>
        </includes>
      </resource>
      <resource>
        <directory>src/main/resources</directory>
      </resource>
    </resources>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-remote-resources-plugin</artifactId>
        <version>1.5</version>
        <configuration>
          <resourceBundles>
            <resourceBundle>${project.groupId}:template-resources:${project.version}</resourceBundle>
          </resourceBundles>
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>process</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-antrun-plugin</artifactId>
        <version>1.8</version>
        <executions>
          <execution>
            <id>create repos index files</id>
            <phase>package</phase>
            <configuration>
              <target>
                <concat fixlastline="yes" destfile="${project.build.directory}/${project.artifactId}-${project.version}/index.conf">
                  <fileset dir="${project.build.directory}/${project.artifactId}-${project.version}" includes="**/repoconf.part"/>
                </concat>
                <concat fixlastline="yes" destfile="${project.build.directory}/${project.artifactId}-${project.version}/index.html">
                  <fileset file="${project.build.directory}/classes/repoheader.html" />
                  <fileset dir="${project.build.directory}/${project.artifactId}-${project.version}" includes="**/repoindex.html"/>
                  <fileset file="${project.build.directory}/classes/repofooter.html" />
                </concat>
              </target>
            </configuration>
            <goals>
              <goal>run</goal>
            </goals>
          </execution>
          <execution>
            <id>delete repo resources</id>
            <phase>package</phase>
            <configuration>
              <tasks>
                <delete>
                  <fileset dir="${project.build.directory}/${project.artifactId}-${project.version}" includes="repo*.html" />
                </delete>
              </tasks>
            </configuration>
            <goals>
              <goal>run</goal>
            </goals>
          </execution>
          <execution>
            <id>create wid service info</id>
            <phase>package</phase>
            <configuration>
              <target>
                <concat fixlastline="yes" destfile="${project.build.directory}/${project.artifactId}-${project.version}/serviceinfo.js">
                  <fileset file="${project.build.directory}/classes/serviceinfoheader.js" />
                  <fileset dir="${project.build.directory}/${project.artifactId}-${project.version}" includes="**/serviceinfo.json"/>
                  <fileset file="${project.build.directory}/classes/serviceinfofooter.js" />
                </concat>
              </target>
            </configuration>
            <goals>
              <goal>run</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-enforcer-plugin</artifactId>
          <executions>
            <execution>
              <id>ban-duplicated-classes</id>
              <phase>validate</phase>
              <goals>
                <goal>enforce</goal>
              </goals>
              <configuration>
                <rules>
                  <banDuplicateClasses>
                    <ignoreClasses combine.children="append">
                      <ignoreClass>com.google.common.*</ignoreClass>
                      <ignoreClass>com.google.thirdparty.*</ignoreClass>
                      <ignoreClass>javax.xml.*</ignoreClass>
                      <ignoreClass>javax.xml.stream.*</ignoreClass>
                      <ignoreClass>javax.xml.namespace.*</ignoreClass>
                      <ignoreClass>javax.ws.rs.*</ignoreClass>
                    </ignoreClasses>
                  </banDuplicateClasses>
                </rules>
              </configuration>
            </execution>
          </executions>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>

  <dependencies>

    <!-- module dependencies -->
    <dependency>
      <groupId>org.jbpm.contrib</groupId>
      <artifactId>archive-workitem</artifactId>
      <type>zip</type>
    </dependency>
    <dependency>
      <groupId>org.jbpm.contrib</groupId>
      <artifactId>dropbox-workitem</artifactId>
      <type>zip</type>
    </dependency>
    <dependency>
      <groupId>org.jbpm.contrib</groupId>
      <artifactId>exec-workitem</artifactId>
      <type>zip</type>
    </dependency>
    <dependency>
      <groupId>org.jbpm.contrib</groupId>
      <artifactId>ftp-workitem</artifactId>
      <type>zip</type>
    </dependency>
    <dependency>
      <groupId>org.jbpm.contrib</groupId>
      <artifactId>google-calendar-workitem</artifactId>
      <type>zip</type>
      <exclusions>
        <exclusion>
          <groupId>com.google.oauth-client</groupId>
          <artifactId>google-oauth-client-jetty</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.jbpm.contrib</groupId>
      <artifactId>google-drive-workitem</artifactId>
      <type>zip</type>
      <exclusions>
        <exclusion>
          <groupId>com.google.oauth-client</groupId>
          <artifactId>google-oauth-client-jetty</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.jbpm.contrib</groupId>
      <artifactId>google-mail-workitem</artifactId>
      <type>zip</type>
      <exclusions>
        <exclusion>
          <groupId>com.google.oauth-client</groupId>
          <artifactId>google-oauth-client-jetty</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.jbpm.contrib</groupId>
      <artifactId>google-sheets-workitem</artifactId>
      <type>zip</type>
      <exclusions>
        <exclusion>
          <groupId>com.google.oauth-client</groupId>
          <artifactId>google-oauth-client-jetty</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.jbpm.contrib</groupId>
      <artifactId>google-tasks-workitem</artifactId>
      <type>zip</type>
      <exclusions>
        <exclusion>
          <groupId>com.google.oauth-client</groupId>
          <artifactId>google-oauth-client-jetty</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.jbpm.contrib</groupId>
      <artifactId>google-translate-workitem</artifactId>
      <type>zip</type>
    </dependency>
    <dependency>
      <groupId>org.jbpm.contrib</groupId>
      <artifactId>ibm-watson-workitem</artifactId>
      <type>zip</type>
    </dependency>
    <dependency>
      <groupId>org.jbpm.contrib</groupId>
      <artifactId>ifttt-workitem</artifactId>
      <type>zip</type>
    </dependency>
    <dependency>
      <groupId>org.jbpm.contrib</groupId>
      <artifactId>jabber-workitem</artifactId>
      <type>zip</type>
    </dependency>
    <dependency>
      <groupId>org.jbpm.contrib</groupId>
      <artifactId>java-workitem</artifactId>
      <type>zip</type>
    </dependency>
    <dependency>
      <groupId>org.jbpm.contrib</groupId>
      <artifactId>jpa-workitem</artifactId>
      <type>zip</type>
    </dependency>
    <dependency>
      <groupId>org.jbpm.contrib</groupId>
      <artifactId>parser-workitem</artifactId>
      <type>zip</type>
    </dependency>
    <dependency>
      <groupId>org.jbpm.contrib</groupId>
      <artifactId>rss-workitem</artifactId>
      <type>zip</type>
    </dependency>
    <dependency>
      <groupId>org.jbpm.contrib</groupId>
      <artifactId>transform-workitem</artifactId>
      <type>zip</type>
    </dependency>
    <dependency>
      <groupId>org.jbpm.contrib</groupId>
      <artifactId>twitter-workitem</artifactId>
      <type>zip</type>
    </dependency>
    <dependency>
      <groupId>org.jbpm.contrib</groupId>
      <artifactId>github-workitem</artifactId>
      <type>zip</type>
    </dependency>
    <dependency>
      <groupId>org.jbpm.contrib</groupId>
      <artifactId>jira-workitem</artifactId>
      <type>zip</type>
    </dependency>
    <dependency>
      <groupId>org.jbpm.contrib</groupId>
      <artifactId>ethereum-workitem</artifactId>
      <type>zip</type>
    </dependency>
    <dependency>
      <groupId>org.jbpm.contrib</groupId>
      <artifactId>camel-workitem</artifactId>
      <type>zip</type>
    </dependency>
    <dependency>
      <groupId>org.jbpm.contrib</groupId>
      <artifactId>openweathermap-workitem</artifactId>
      <type>zip</type>
    </dependency>
    <dependency>
      <groupId>org.jbpm.contrib</groupId>
      <artifactId>mavenembedder-workitem</artifactId>
      <type>zip</type>
    </dependency>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>template-resources</artifactId>
      <scope>provided</scope>
    </dependency>

    <!-- wid processor depends -->
    <dependency>
      <groupId>org.jbpm</groupId>
      <artifactId>jbpm-workitems-core</artifactId>
    </dependency>

    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-databind</artifactId>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-core</artifactId>
      <scope>provided</scope>
    </dependency>


    <dependency>
      <groupId>commons-io</groupId>
      <artifactId>commons-io</artifactId>
    </dependency>

    <!-- test dependencies -->
    <dependency>
      <groupId>org.jbpm</groupId>
      <artifactId>jbpm-workitems-core</artifactId>
      <type>test-jar</type>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.eclipse.jetty</groupId>
      <artifactId>jetty-server</artifactId>
      <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-servlet</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.eclipse.jetty</groupId>
      <artifactId>jetty-servlets</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.eclipse.jetty</groupId>
      <artifactId>jetty-webapp</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.eclipse.jetty</groupId>
      <artifactId>jetty-client</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-model</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
    </dependency>

    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.powermock</groupId>
      <artifactId>powermock-api-mockito</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.powermock</groupId>
      <artifactId>powermock-module-junit4</artifactId>
      <scope>test</scope>
    </dependency>

  </dependencies>
</project>