Skip to content

Instantly share code, notes, and snippets.

@fayimora
Created March 23, 2020 10:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fayimora/fc1cba2208117d5253c5b0a59a1f3255 to your computer and use it in GitHub Desktop.
Save fayimora/fc1cba2208117d5253c5b0a59a1f3255 to your computer and use it in GitHub Desktop.
<?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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.euromonitor</groupId>
<artifactId>Via-Dataflow-Service</artifactId>
<version>1.0-SNAPSHOT</version>
<name>Via-Dataflow-Service</name>
<url>https://www.euromonitor.com</url>
<properties>
<beam.version>2.19.0</beam.version>
<beam-vendor-guava.version>0.1</beam-vendor-guava.version>
<hamcrest.version>1.3</hamcrest.version>
<java.version>1.8</java.version>
<jib.maven.version>1.5.1</jib.maven.version>
<junit.version>4.12</junit.version>
<junit-dep.version>4.10</junit-dep.version>
<derby.version>10.12.1.1</derby.version>
<mockito-core.version>2.25.0</mockito-core.version>
<commons-csv.version>1.5</commons-csv.version>
<!-- <bigquery.version>1.102.0</bigquery.version>-->
<!-- <google.cloud.core>1.61.0</google.cloud.core>-->
<autovalue.annotations.version>1.6</autovalue.annotations.version>
<autovalue.version>1.6.2</autovalue.version>
<joda.version>2.9.7</joda.version>
<slf4j.version>1.7.25</slf4j.version>
<surefire.version>2.21.0</surefire.version>
<maven-jar-plugin.version>3.0.2</maven-jar-plugin.version>
<checkstyle.version>8.7</checkstyle.version>
<maven-source-plugin.version>3.0.1</maven-source-plugin.version>
<findbugs.version>3.0.1</findbugs.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
<os-maven-plugin.version>1.5.0.Final</os-maven-plugin.version>
<maven-checkstyle-plugin.version>3.0.0</maven-checkstyle-plugin.version>
<maven-compiler-plugin.version>3.6.2</maven-compiler-plugin.version>
<maven-dependency-plugin.version>3.0.1</maven-dependency-plugin.version>
<maven-enforcer-plugin.version>3.0.0-M1</maven-enforcer-plugin.version>
<maven-javadoc-plugin.version>3.0.0-M1</maven-javadoc-plugin.version>
<mvn-target-dir>${basedir}/target</mvn-target-dir>
</properties>
<dependencies>
<dependency>
<groupId>org.apache.beam</groupId>
<artifactId>beam-sdks-java-core</artifactId>
<version>${beam.version}</version>
</dependency>
<dependency>
<groupId>org.apache.beam</groupId>
<artifactId>beam-sdks-java-io-google-cloud-platform</artifactId>
<version>${beam.version}</version>
<exclusions>
<exclusion>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</exclusion>
<exclusion>
<groupId>com.google.cloud.bigtable</groupId>
<artifactId>bigtable-client-core</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.beam</groupId>
<artifactId>beam-sdks-java-extensions-google-cloud-platform-core</artifactId>
<version>${beam.version}</version>
<exclusions>
<exclusion>
<groupId>com.google.cloud.bigtable</groupId>
<artifactId>bigtable-client-core</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.beam</groupId>
<artifactId>beam-runners-google-cloud-dataflow-java</artifactId>
<version>${beam.version}</version>
</dependency>
<dependency>
<groupId>org.apache.beam</groupId>
<artifactId>beam-sdks-java-io-elasticsearch</artifactId>
<version>${beam.version}</version>
</dependency>
<!-- <dependency>-->
<!-- <groupId>org.apache.commons</groupId>-->
<!-- <artifactId>commons-csv</artifactId>-->
<!-- <version>${commons-csv.version}</version>-->
<!-- </dependency>-->
<dependency>
<!-- Direct runner included for local development and testing. -->
<groupId>org.apache.beam</groupId>
<artifactId>beam-runners-direct-java</artifactId>
<version>${beam.version}</version>
</dependency>
<dependency>
<groupId>org.apache.beam</groupId>
<artifactId>beam-vendor-guava-20_0</artifactId>
<version>${beam-vendor-guava.version}</version>
</dependency>
<!-- <dependency>-->
<!-- <groupId>com.google.api-client</groupId>-->
<!-- <artifactId>google-api-client</artifactId>-->
<!-- <version>1.30.9</version>-->
<!-- </dependency>-->
<!-- Test -->
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
<version>${hamcrest.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-library</artifactId>
<version>${hamcrest.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit-dep</artifactId>
<version>${junit-dep.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>${mockito-core.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derby</artifactId>
<version>${derby.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derbyclient</artifactId>
<version>${derby.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derbynet</artifactId>
<version>${derby.version}</version>
<scope>test</scope>
</dependency>
<!-- Misc -->
<dependency>
<groupId>com.google.auto.value</groupId>
<artifactId>auto-value</artifactId>
<version>${autovalue.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.google.auto.value</groupId>
<artifactId>auto-value-annotations</artifactId>
<version>${autovalue.annotations.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
<version>${joda.version}</version>
</dependency>
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
<version>${findbugs.version}</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit-dep</artifactId>
<version>4.10</version>
<scope>compile</scope>
</dependency>
</dependencies>
<!-- <build>-->
<!-- <pluginManagement>&lt;!&ndash; lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) &ndash;&gt;-->
<!-- <plugins>-->
<!-- &lt;!&ndash; clean lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#clean_Lifecycle &ndash;&gt;-->
<!-- <plugin>-->
<!-- <artifactId>maven-clean-plugin</artifactId>-->
<!-- <version>3.1.0</version>-->
<!-- </plugin>-->
<!-- &lt;!&ndash; default lifecycle, jar packaging: see https://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_jar_packaging &ndash;&gt;-->
<!-- <plugin>-->
<!-- <artifactId>maven-resources-plugin</artifactId>-->
<!-- <version>3.0.2</version>-->
<!-- </plugin>-->
<!-- <plugin>-->
<!-- <artifactId>maven-compiler-plugin</artifactId>-->
<!-- <version>3.8.0</version>-->
<!-- </plugin>-->
<!-- <plugin>-->
<!-- <artifactId>maven-surefire-plugin</artifactId>-->
<!-- <version>2.22.1</version>-->
<!-- </plugin>-->
<!-- <plugin>-->
<!-- <artifactId>maven-jar-plugin</artifactId>-->
<!-- <version>3.0.2</version>-->
<!-- </plugin>-->
<!-- <plugin>-->
<!-- <artifactId>maven-install-plugin</artifactId>-->
<!-- <version>2.5.2</version>-->
<!-- </plugin>-->
<!-- <plugin>-->
<!-- <artifactId>maven-deploy-plugin</artifactId>-->
<!-- <version>2.8.2</version>-->
<!-- </plugin>-->
<!-- &lt;!&ndash; site lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#site_Lifecycle &ndash;&gt;-->
<!-- <plugin>-->
<!-- <artifactId>maven-site-plugin</artifactId>-->
<!-- <version>3.7.1</version>-->
<!-- </plugin>-->
<!-- <plugin>-->
<!-- <artifactId>maven-project-info-reports-plugin</artifactId>-->
<!-- <version>3.0.0</version>-->
<!-- </plugin>-->
<!-- </plugins>-->
<!-- </pluginManagement>-->
<!-- <plugins>-->
<!-- <plugin>-->
<!-- <groupId>org.apache.maven.plugins</groupId>-->
<!-- <artifactId>maven-compiler-plugin</artifactId>-->
<!-- <configuration>-->
<!-- <source>8</source>-->
<!-- <target>8</target>-->
<!-- </configuration>-->
<!-- </plugin>-->
<!-- </plugins>-->
<!-- </build>-->
<build>
<directory>${mvn-target-dir}</directory>
<extensions>
<extension>
<groupId>kr.motd.maven</groupId>
<artifactId>os-maven-plugin</artifactId>
<version>${os-maven-plugin.version}</version>
</extension>
</extensions>
<pluginManagement>
<plugins>
<!--
The jib plugin provides the capability to containerize this application based on
properties specified in the configuration without having to build a Dockerfile manually.
Jib also integrates with the maven lifecycle and helps push the image to the repository
specified in the configuration or via the command line.
https://github.com/GoogleContainerTools/jib/tree/master/jib-maven-plugin
-->
<plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>jib-maven-plugin</artifactId>
<version>${jib.maven.version}</version>
<configuration>
<from>
<!--
The Dataflow Template base image to use. This
should not need to change unless we want to use the JDK11
-->
<image>${base-container-image}:${base-container-image.version}</image>
</from>
<container>
<!--
The root directory to use to expand the compiled classes and dependencies in. The
Jib plugin will create the following directories under this root:
- resources: All the files under src/resources will be copied to this folder as-is.
- libs: All dependency jars needed to execute this pipeline will be copied into this
folder.
- classes: Compiled pipeline code will be copied into this folder.
The libs and classes folders under appRoot should thus be added in the classpath
defined in src/resources/command-spec.json.
-->
<appRoot>${app-root}</appRoot>
<!--
INHERIT the base containers entrypoint. Do not override or the Dataflow service
will be unable to launch this template.
-->
<entrypoint>INHERIT</entrypoint>
<environment>
<!--
Set an environment variable called DATAFLOW_JAVA_COMMAND_SPEC that points to the
java-command-spec.json file inside the container. Note that since the Jib plugin
copies the containers of src/resources/* to appRoot/resources, the value of this
environment variable can be set here.
-->
<DATAFLOW_JAVA_COMMAND_SPEC>
${command-spec}
</DATAFLOW_JAVA_COMMAND_SPEC>
</environment>
</container>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.0.0</version>
<executions>
<execution>
<id>bundle-and-repackage</id>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<dependencyReducedPomLocation>
${mvn-target-dir}/dependency-reduced-pom.xml
</dependencyReducedPomLocation>
<shadeTestJar>true</shadeTestJar>
<artifactSet>
<includes>
<include>*:*</include>
</includes>
</artifactSet>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
</excludes>
</filter>
</filters>
<transformers>
<transformer
implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.6.0</version>
<configuration>
<cleanupDaemonThreads>false</cleanupDaemonThreads>
</configuration>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>${maven-dependency-plugin.version}</version>
<executions>
<execution>
<id>analyze-dependencies</id>
<goals>
<goal>analyze-only</goal>
</goals>
<configuration>
<!-- Ignore runtime-only dependencies in analysis -->
<ignoreNonCompile>true</ignoreNonCompile>
<failOnWarning>true</failOnWarning>
<ignoredUsedUndeclaredDependencies>
<ignoredUsedUndeclaredDependency>
com.google.api.grpc:proto-google-cloud-dlp-v2
</ignoredUsedUndeclaredDependency>
<ignoredUsedUndeclaredDependency>
org.apache.beam:beam-model-pipeline
</ignoredUsedUndeclaredDependency>
</ignoredUsedUndeclaredDependencies>
<ignoredUnusedDeclaredDependencies>
<ignoredUnusedDeclaredDependency>
org.slf4j:slf4j-api
</ignoredUnusedDeclaredDependency>
<ignoredUnusedDeclaredDependency>
org.slf4j:slf4j-simple
</ignoredUnusedDeclaredDependency>
<ignoredUnusedDeclaredDependency>
org.apache.beam:beam-sdks-java-extensions-google-cloud-platform-core
</ignoredUnusedDeclaredDependency>
<ignoredUnusedDeclaredDependency>
org.apache.beam:beam-runners-google-cloud-dataflow-java
</ignoredUnusedDeclaredDependency>
<ignoredUnusedDeclaredDependency>
org.slf4j:slf4j-simple
</ignoredUnusedDeclaredDependency>
<ignoredUnusedDeclaredDependency>
com.google.code.findbugs:jsr305
</ignoredUnusedDeclaredDependency>
<ignoredUnusedDeclaredDependency>
org.apache.beam:beam-runners-direct-java
</ignoredUnusedDeclaredDependency>
<ignoredUnusedDeclaredDependency>
org.threeten:threetenbp
</ignoredUnusedDeclaredDependency>
<ignoredUnusedDeclaredDependency>
org.apache.beam:beam-sdks-java-core
</ignoredUnusedDeclaredDependency>
<ignoredUnusedDeclaredDependency>
com.google.auto.value:auto-value-annotations
</ignoredUnusedDeclaredDependency>
<ignoredUnusedDeclaredDependency>
joda-time:joda-time
</ignoredUnusedDeclaredDependency>
<ignoredUnusedDeclaredDependency>
org.apache.beam:beam-vendor-guava-20_0
</ignoredUnusedDeclaredDependency>
<ignoredUnusedDeclaredDependency>
org.apache.beam:beam-sdks-java-io-google-cloud-platform
</ignoredUnusedDeclaredDependency>
</ignoredUnusedDeclaredDependencies>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler-plugin.version}</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-source-plugin</artifactId>
<version>${maven-source-plugin.version}</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<executions>
<execution>
<id>bundle-and-repackage</id>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<shadeTestJar>true</shadeTestJar>
<artifactSet>
<includes>
<include>*:*</include>
</includes>
</artifactSet>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
</excludes>
</filter>
</filters>
<transformers>
<transformer
implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<!-- Set up Javadoc configuration for javadoc run via in the Maven
build. Teleport only uses the plugin to create the individual javadoc
attached artifacts used for IDEs. The combined javadoc for the
website is built in the sdks/java/javadoc directory. Rather than
duplicate a raft of configuration between the ant.xml there and
here, we leave things simple here. -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>${maven-javadoc-plugin.version}</version>
<configuration>
<windowtitle>Teleport for Java, version ${project.version} API</windowtitle>
<doctitle>Teleport for Java, version ${project.version}</doctitle>
<use>false</use>
<quiet>true</quiet>
<notimestamp>true</notimestamp>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>${maven-jar-plugin.version}</version>
</plugin>
<!-- <plugin>-->
<!-- <groupId>org.apache.maven.plugins</groupId>-->
<!-- <artifactId>maven-checkstyle-plugin</artifactId>-->
<!-- <version>${maven-checkstyle-plugin.version}</version>-->
<!-- <dependencies>-->
<!-- <dependency>-->
<!-- <groupId>com.puppycrawl.tools</groupId>-->
<!-- <artifactId>checkstyle</artifactId>-->
<!-- <version>${checkstyle.version}</version>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>org.apache.beam</groupId>-->
<!-- <artifactId>beam-sdks-java-build-tools</artifactId>-->
<!-- <version>${beam.version}</version>-->
<!-- </dependency>-->
<!-- </dependencies>-->
<!-- <configuration>-->
<!-- <configLocation>checkstyle/checkstyle.xml</configLocation>-->
<!-- <suppressionsLocation>checkstyle/suppressions.xml</suppressionsLocation>-->
<!-- <consoleOutput>true</consoleOutput>-->
<!-- <failOnViolation>true</failOnViolation>-->
<!-- <includeResources>false</includeResources>-->
<!-- <includeTestSourceDirectory>true</includeTestSourceDirectory>-->
<!-- </configuration>-->
<!-- <executions>-->
<!-- &lt;!&ndash;-->
<!-- Execute checkstyle after compilation but before tests.-->
<!-- This ensures that any parsing or type checking errors are from-->
<!-- javac, so they look as expected. Beyond that, we want to-->
<!-- fail as early as possible.-->
<!-- &ndash;&gt;-->
<!-- <execution>-->
<!-- <phase>test-compile</phase>-->
<!-- <goals>-->
<!-- <goal>check</goal>-->
<!-- </goals>-->
<!-- </execution>-->
<!-- </executions>-->
<!-- </plugin>-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>${maven-enforcer-plugin.version}</version>
<executions>
<execution>
<id>enforce</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<enforceBytecodeVersion>
<maxJdkVersion>1.9</maxJdkVersion>
<excludes>
<!--
Supplied by the user JDK and compiled with matching
version. Is not shaded, so safe to ignore.
-->
<exclude>jdk.tools:jdk.tools</exclude>
</excludes>
</enforceBytecodeVersion>
<requireJavaVersion>
<version>[1.7,)</version>
</requireJavaVersion>
<requireMavenVersion>
<!-- Keep aligned with prerequisite section below. -->
<version>[3.2,)</version>
</requireMavenVersion>
</rules>
</configuration>
</execution>
<execution>
<id>enforce-banned-dependencies</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<bannedDependencies>
<excludes>
<exclude>com.google.guava:guava-jdk5</exclude>
<exclude>com.google.protobuf:protobuf-lite</exclude>
</excludes>
</bannedDependencies>
</rules>
<fail>true</fail>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.codehaus.mojo</groupId>
<artifactId>extra-enforcer-rules</artifactId>
<version>1.0-beta-6</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${surefire.version}</version>
</plugin>
</plugins>
</build>
</project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment