blob: 9cc2c1f9a07a56f9843330e67c975ef0c943f97e [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<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/xsd/maven-4.0.0.xsd">
<parent>
<groupId>org.apache.streams</groupId>
<artifactId>streams-examples-local</artifactId>
<version>0.5-incubating</version>
<relativePath>..</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>mongo-elasticsearch-sync</artifactId>
<name>mongo-elasticsearch-sync</name>
<description>Copies documents from mongodb to elasticsearch.</description>
<properties>
<docker.repo>apachestreams</docker.repo>
<elasticsearch.version>2.3.5</elasticsearch.version>
<lucene.version>5.5.0</lucene.version>
</properties>
<dependencies>
<!-- Test includes -->
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-test-framework</artifactId>
<version>${lucene.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-codecs</artifactId>
<version>${lucene.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.elasticsearch</groupId>
<artifactId>elasticsearch</artifactId>
<version>${elasticsearch.version}</version>
<type>test-jar</type>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>${testng.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-all</artifactId>
<version>1.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.streams</groupId>
<artifactId>streams-core</artifactId>
</dependency>
<dependency>
<groupId>com.typesafe</groupId>
<artifactId>config</artifactId>
</dependency>
<dependency>
<groupId>org.apache.streams</groupId>
<artifactId>streams-config</artifactId>
</dependency>
<dependency>
<groupId>org.apache.streams</groupId>
<artifactId>streams-runtime-local</artifactId>
</dependency>
<dependency>
<groupId>org.apache.streams</groupId>
<artifactId>streams-persist-elasticsearch</artifactId>
</dependency>
<dependency>
<groupId>org.apache.streams</groupId>
<artifactId>streams-persist-mongo</artifactId>
</dependency>
<dependency>
<groupId>org.apache.streams</groupId>
<artifactId>streams-persist-mongo</artifactId>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.streams</groupId>
<artifactId>streams-schema-activitystreams</artifactId>
<type>test-jar</type>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>log4j-over-slf4j</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jul-to-slf4j</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>${logback.version}</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-core</artifactId>
<version>${logback.version}</version>
</dependency>
<dependency>
<groupId>org.apache.streams</groupId>
<artifactId>streams-testing</artifactId>
<scope>test</scope>
<type>test-jar</type>
</dependency>
</dependencies>
<build>
<sourceDirectory>src/main/java</sourceDirectory>
<testSourceDirectory>src/test/java</testSourceDirectory>
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
</resources>
<testResources>
<testResource>
<directory>src/test/resources</directory>
</testResource>
</testResources>
<plugins>
<!-- This binary runs with logback -->
<!-- Keep log4j out -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>1.3.1</version>
<executions>
<execution>
<id>enforce-banned-dependencies</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<bannedDependencies>
<excludes>
<exclude>org.slf4j:slf4j-log4j12</exclude>
<exclude>org.slf4j:slf4j-jcl</exclude>
<exclude>org.slf4j:slf4j-jdk14</exclude>
<exclude>org.log4j:log4j</exclude>
<exclude>commons-logging:commons-logging</exclude>
</excludes>
</bannedDependencies>
</rules>
<fail>true</fail>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.streams.plugins</groupId>
<artifactId>streams-plugin-pojo</artifactId>
<configuration>
<sourcePaths>
<sourcePath>${project.basedir}/src/main/jsonschema</sourcePath>
</sourcePaths>
<targetDirectory>${project.basedir}/target/generated-sources/pojo</targetDirectory>
<targetPackage>org.apache.streams.example.elasticsearch</targetPackage>
</configuration>
<executions>
<execution>
<goals>
<goal>generate-sources</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.apache.streams</groupId>
<artifactId>streams-persist-elasticsearch</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.streams</groupId>
<artifactId>streams-persist-mongo</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>add-source</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>target/generated-sources/pojo</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<configuration>
<includes>**/*.json,**/*.conf</includes>
<outputDirectory>${project.build.directory}/test-classes</outputDirectory>
<includeGroupIds>org.apache.streams</includeGroupIds>
<includeTypes>test-jar</includeTypes>
</configuration>
<executions>
<execution>
<id>test-resource-dependencies</id>
<phase>process-test-resources</phase>
<goals>
<goal>unpack-dependencies</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<configuration>
<!-- Run integration test suite rather than individual tests. -->
<suiteXmlFiles>
<suiteXmlFile>target/test-classes/testng.xml</suiteXmlFile>
</suiteXmlFiles>
</configuration>
<dependencies>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-testng</artifactId>
<version>${failsafe.plugin.version}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>dockerITs</id>
<activation>
<activeByDefault>false</activeByDefault>
<property>
<name>skipITs</name>
<value>false</value>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>${docker.plugin.version}</version>
<configuration combine.self="override">
<watchInterval>500</watchInterval>
<logDate>default</logDate>
<verbose>true</verbose>
<autoPull>on</autoPull>
<images>
<image>
<name>elasticsearch:2.3.5</name>
<alias>elasticsearch</alias>
<run>
<namingStrategy>none</namingStrategy>
<ports>
<port>${es.http.host}:${es.http.port}:9200</port>
<port>${es.tcp.host}:${es.tcp.port}:9300</port>
</ports>
<portPropertyFile>elasticsearch.properties</portPropertyFile>
<wait>
<log>elasticsearch startup</log>
<http>
<url>http://${es.http.host}:${es.http.port}</url>
<method>GET</method>
<status>200</status>
</http>
<time>20000</time>
<kill>1000</kill>
<shutdown>500</shutdown>
<!--<tcp>-->
<!--<host>${es.transport.host}</host>-->
<!--<ports>-->
<!--<port>${es.transport.port}</port>-->
<!--</ports>-->
<!--</tcp>-->
</wait>
<log>
<enabled>true</enabled>
<date>default</date>
<color>cyan</color>
</log>
</run>
<watch>
<mode>none</mode>
</watch>
</image>
<image>
<name>mongo:3.2.0</name>
<alias>mongo</alias>
<run>
<namingStrategy>none</namingStrategy>
<ports>
<port>${mongo.tcp.host}:${mongo.tcp.port}:27017</port>
</ports>
<portPropertyFile>mongo.properties</portPropertyFile>
<log>
<enabled>true</enabled>
<date>default</date>
<color>cyan</color>
</log>
</run>
<watch>
<mode>none</mode>
</watch>
</image>
</images>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>