| <?xml version="1.0"?> |
| <!-- |
| 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"> |
| |
| <modelVersion>4.0.0</modelVersion> |
| |
| <parent> |
| <groupId>org.apache.beam</groupId> |
| <artifactId>beam-sdks-java-extensions-parent</artifactId> |
| <version>2.3.0</version> |
| <relativePath>../pom.xml</relativePath> |
| </parent> |
| |
| <artifactId>beam-sdks-java-extensions-sql</artifactId> |
| <name>Apache Beam :: SDKs :: Java :: Extensions :: SQL</name> |
| <description>Beam SQL provides a new interface to generate a Beam pipeline from SQL statement</description> |
| |
| <packaging>jar</packaging> |
| |
| <properties> |
| <timestamp>${maven.build.timestamp}</timestamp> |
| <maven.build.timestamp.format>yyyy-MM-dd HH:mm</maven.build.timestamp.format> |
| <calcite.version>1.13.0</calcite.version> |
| <avatica.version>1.10.0</avatica.version> |
| <mockito.version>1.9.5</mockito.version> |
| </properties> |
| |
| <profiles> |
| <!-- |
| The direct runner is available by default. |
| You can also include it on the classpath explicitly with -P direct-runner |
| --> |
| <profile> |
| <id>direct-runner</id> |
| <activation> |
| <activeByDefault>true</activeByDefault> |
| </activation> |
| <dependencies> |
| <dependency> |
| <groupId>org.apache.beam</groupId> |
| <artifactId>beam-runners-direct-java</artifactId> |
| <scope>runtime</scope> |
| </dependency> |
| </dependencies> |
| </profile> |
| </profiles> |
| |
| <build> |
| <resources> |
| <resource> |
| <directory>src/main/resources</directory> |
| <filtering>true</filtering> |
| </resource> |
| </resources> |
| |
| <pluginManagement> |
| <plugins> |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-checkstyle-plugin</artifactId> |
| <configuration> |
| <!-- Set testSourceDirectory in order to exclude generated-test-sources --> |
| <testSourceDirectory>${project.basedir}/src/test/</testSourceDirectory> |
| <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory> |
| </configuration> |
| </plugin> |
| </plugins> |
| </pluginManagement> |
| |
| <plugins> |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-compiler-plugin</artifactId> |
| <configuration> |
| <source>1.8</source> |
| <target>1.8</target> |
| <useIncrementalCompilation>false</useIncrementalCompilation> |
| <compilerArgs> |
| <!-- Generated calcite code has some deprecation warning --> |
| <arg>-Xlint:-deprecation</arg> |
| </compilerArgs> |
| </configuration> |
| </plugin> |
| <plugin> |
| <artifactId>maven-resources-plugin</artifactId> |
| <executions> |
| <execution> |
| <id>copy-fmpp-resources</id> |
| <phase>initialize</phase> |
| <goals> |
| <goal>copy-resources</goal> |
| </goals> |
| <configuration> |
| <outputDirectory>${project.build.directory}/codegen</outputDirectory> |
| <resources> |
| <resource> |
| <directory>src/main/codegen</directory> |
| <filtering>false</filtering> |
| </resource> |
| </resources> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| <plugin> |
| <!-- Extract parser grammar template from calcite-core.jar and put |
| it under ${project.build.directory} where all freemarker templates are. --> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-dependency-plugin</artifactId> |
| <version>2.8</version> |
| <executions> |
| <execution> |
| <id>unpack-parser-template</id> |
| <phase>initialize</phase> |
| <goals> |
| <goal>unpack</goal> |
| </goals> |
| <configuration> |
| <artifactItems> |
| <artifactItem> |
| <groupId>org.apache.calcite</groupId> |
| <artifactId>calcite-core</artifactId> |
| <type>jar</type> |
| <overWrite>true</overWrite> |
| <outputDirectory>${project.build.directory}/</outputDirectory> |
| <includes>**/Parser.jj</includes> |
| </artifactItem> |
| </artifactItems> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| |
| <plugin> |
| <groupId>com.googlecode.fmpp-maven-plugin</groupId> |
| <artifactId>fmpp-maven-plugin</artifactId> |
| <version>1.0</version> |
| <dependencies> |
| <dependency> |
| <groupId>org.freemarker</groupId> |
| <artifactId>freemarker</artifactId> |
| <version>2.3.25-incubating</version> |
| </dependency> |
| </dependencies> |
| <executions> |
| <execution> |
| <id>generate-fmpp-sources</id> |
| <phase>generate-sources</phase> |
| <goals> |
| <goal>generate</goal> |
| </goals> |
| <configuration> |
| <cfgFile>${project.build.directory}/codegen/config.fmpp</cfgFile> |
| <outputDirectory>target/generated-sources</outputDirectory> |
| <templateDirectory>${project.build.directory}/codegen/templates</templateDirectory> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| |
| <plugin> |
| <groupId>org.codehaus.mojo</groupId> |
| <artifactId>build-helper-maven-plugin</artifactId> |
| <version>1.9</version> |
| <executions> |
| <execution> |
| <id>add-generated-sources</id> |
| <phase>process-sources</phase> |
| <goals> |
| <goal>add-source</goal> |
| </goals> |
| <configuration> |
| <sources> |
| <source>${project.build.directory}/generated-sources</source> |
| </sources> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| |
| <plugin> |
| <groupId>org.codehaus.mojo</groupId> |
| <artifactId>javacc-maven-plugin</artifactId> |
| <version>2.4</version> |
| <executions> |
| <execution> |
| <phase>generate-sources</phase> |
| <id>javacc</id> |
| <goals> |
| <goal>javacc</goal> |
| </goals> |
| <configuration> |
| <sourceDirectory>${project.build.directory}/generated-sources/</sourceDirectory> |
| <includes> |
| <include>**/Parser.jj</include> |
| </includes> |
| <lookAhead>2</lookAhead> |
| <isStatic>false</isStatic> |
| <outputDirectory>${project.build.directory}/generated-sources/</outputDirectory> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-surefire-plugin</artifactId> |
| <configuration> |
| <argLine>-da</argLine> <!-- disable assert in Calcite converter validation --> |
| </configuration> |
| </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>com.google.guava:guava</include> |
| <!-- include Apache Calcite and related dependencies --> |
| <include>org.apache.calcite:*</include> |
| <include>org.apache.calcite.avatica:*</include> |
| <include>org.codehaus.janino:*</include> |
| <include>com.google.protobuf:*</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> |
| <relocations> |
| <relocation> |
| <pattern>com.google.common</pattern> |
| <excludes> |
| <!-- com.google.common is too generic, need to exclude guava-testlib --> |
| <exclude>com.google.common.**.testing.*</exclude> |
| </excludes> |
| <!--suppress MavenModelInspection --> |
| <shadedPattern> |
| org.apache.${renderedArtifactId}.repackaged.com.google.common |
| </shadedPattern> |
| </relocation> |
| <relocation> |
| <pattern>com.google.thirdparty</pattern> |
| <!--suppress MavenModelInspection --> |
| <shadedPattern> |
| org.apache.${renderedArtifactId}.repackaged.com.google.thirdparty |
| </shadedPattern> |
| </relocation> |
| <relocation> |
| <pattern>com.google.protobuf</pattern> |
| <shadedPattern> |
| org.apache.${renderedArtifactId}.repackaged.com.google.protobuf |
| </shadedPattern> |
| </relocation> |
| <relocation> |
| <pattern>org.apache.calcite</pattern> |
| <shadedPattern> |
| org.apache.${renderedArtifactId}.repackaged.org.apache.calcite |
| </shadedPattern> |
| </relocation> |
| <relocation> |
| <pattern>org.codehaus</pattern> |
| <shadedPattern> |
| org.apache.${renderedArtifactId}.repackaged.org.codehaus |
| </shadedPattern> |
| </relocation> |
| </relocations> |
| <transformers> |
| <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" /> |
| </transformers> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| |
| <!-- Coverage analysis for unit tests. --> |
| <plugin> |
| <groupId>org.jacoco</groupId> |
| <artifactId>jacoco-maven-plugin</artifactId> |
| </plugin> |
| </plugins> |
| </build> |
| |
| <dependencies> |
| <dependency> |
| <groupId>org.apache.calcite</groupId> |
| <artifactId>calcite-core</artifactId> |
| <version>${calcite.version}</version> |
| </dependency> |
| |
| <dependency> |
| <groupId>org.apache.calcite</groupId> |
| <artifactId>calcite-linq4j</artifactId> |
| <version>${calcite.version}</version> |
| </dependency> |
| |
| <dependency> |
| <groupId>org.apache.calcite.avatica</groupId> |
| <artifactId>avatica-core</artifactId> |
| <version>${avatica.version}</version> |
| </dependency> |
| |
| <dependency> |
| <groupId>org.apache.beam</groupId> |
| <artifactId>beam-sdks-java-core</artifactId> |
| <exclusions> |
| <exclusion> |
| <groupId>com.google.protobuf</groupId> |
| <artifactId>protobuf-lite</artifactId> |
| </exclusion> |
| </exclusions> |
| </dependency> |
| |
| <dependency> |
| <groupId>com.google.code.findbugs</groupId> |
| <artifactId>jsr305</artifactId> |
| </dependency> |
| |
| <dependency> |
| <groupId>com.google.guava</groupId> |
| <artifactId>guava</artifactId> |
| </dependency> |
| |
| <dependency> |
| <groupId>org.slf4j</groupId> |
| <artifactId>slf4j-jdk14</artifactId> |
| </dependency> |
| |
| <dependency> |
| <groupId>org.slf4j</groupId> |
| <artifactId>slf4j-api</artifactId> |
| </dependency> |
| |
| <dependency> |
| <groupId>org.apache.commons</groupId> |
| <artifactId>commons-csv</artifactId> |
| </dependency> |
| |
| <dependency> |
| <groupId>joda-time</groupId> |
| <artifactId>joda-time</artifactId> |
| </dependency> |
| |
| <dependency> |
| <groupId>org.apache.beam</groupId> |
| <artifactId>beam-sdks-java-extensions-join-library</artifactId> |
| </dependency> |
| |
| <dependency> |
| <groupId>com.google.auto.value</groupId> |
| <artifactId>auto-value</artifactId> |
| <!-- this is a hack to make it available at compile time but not bundled.--> |
| <scope>provided</scope> |
| </dependency> |
| |
| <dependency> |
| <groupId>org.apache.beam</groupId> |
| <artifactId>beam-sdks-java-io-kafka</artifactId> |
| <scope>provided</scope> |
| </dependency> |
| |
| <dependency> |
| <groupId>org.apache.kafka</groupId> |
| <artifactId>kafka-clients</artifactId> |
| <scope>provided</scope> |
| </dependency> |
| |
| <!-- for tests --> |
| <dependency> |
| <groupId>junit</groupId> |
| <artifactId>junit</artifactId> |
| <scope>test</scope> |
| </dependency> |
| |
| <dependency> |
| <groupId>org.hamcrest</groupId> |
| <artifactId>hamcrest-all</artifactId> |
| <scope>test</scope> |
| </dependency> |
| <dependency> |
| <groupId>org.mockito</groupId> |
| <artifactId>mockito-all</artifactId> |
| <version>${mockito.version}</version> |
| <scope>test</scope> |
| </dependency> |
| <dependency> |
| <groupId>com.alibaba</groupId> |
| <artifactId>fastjson</artifactId> |
| <version>1.2.12</version> |
| </dependency> |
| </dependencies> |
| </project> |