| <?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/maven-v4_0_0.xsd"> |
| <modelVersion>4.0.0</modelVersion> |
| |
| <groupId>org.apache.mrql</groupId> |
| <artifactId>mrql-spark</artifactId> |
| <packaging>jar</packaging> |
| <name>mrql-spark</name> |
| <description>MRQL evaluation in Spark mode on Apache Spark</description> |
| <url>http://mrql.incubator.apache.org/</url> |
| <inceptionYear>2013</inceptionYear> |
| |
| <parent> |
| <groupId>org.apache.mrql</groupId> |
| <artifactId>MRQL</artifactId> |
| <version>0.9.0-incubating</version> |
| </parent> |
| |
| <dependencies> |
| <dependency> |
| <groupId>org.apache.mrql</groupId> |
| <artifactId>gen</artifactId> |
| <version>${project.version}</version> |
| </dependency> |
| <dependency> |
| <groupId>org.spark-project</groupId> |
| <artifactId>spark-core_2.9.3</artifactId> |
| <version>${spark.version}</version> |
| </dependency> |
| </dependencies> |
| |
| <build> |
| <plugins> |
| <plugin> |
| <groupId>org.codehaus.mojo</groupId> |
| <artifactId>build-helper-maven-plugin</artifactId> |
| <version>1.8</version> |
| <executions> |
| <execution> |
| <phase>generate-sources</phase> |
| <goals><goal>add-source</goal></goals> |
| <configuration> |
| <sources> |
| <source>../src/main/java/core</source> |
| <source>../src/main/java/spark</source> |
| </sources> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-shade-plugin</artifactId> |
| <version>2.1</version> |
| <executions> |
| <execution> |
| <phase>package</phase> |
| <goals> |
| <goal>shade</goal> |
| </goals> |
| <configuration> |
| <artifactSet> |
| <includes> |
| <include>jline:jline</include> |
| <include>*:java-cup</include> |
| <include>org.apache.mrql:*</include> |
| </includes> |
| </artifactSet> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-jar-plugin</artifactId> |
| <version>2.4</version> |
| <configuration> |
| <finalName>mrql-spark-${project.version}</finalName> |
| <outputDirectory>${project.parent.basedir}/lib</outputDirectory> |
| </configuration> |
| </plugin> |
| <plugin> |
| <groupId>de.jflex</groupId> |
| <artifactId>maven-jflex-plugin</artifactId> |
| <version>1.4.3</version> |
| <executions> |
| <execution> |
| <goals> |
| <goal>generate</goal> |
| </goals> |
| <configuration> |
| <lexDefinitions> |
| <lexDefinition>../src/main/java/core/mrql.lex</lexDefinition> |
| <lexDefinition>../src/main/java/core/JSON.lex</lexDefinition> |
| </lexDefinitions> |
| <outputDirectory>${project.build.directory}/generated-sources</outputDirectory> |
| <verbose>false</verbose> |
| <backup>false</backup> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| <plugin> |
| <artifactId>maven-antrun-plugin</artifactId> |
| <version>1.7</version> |
| <executions> |
| <execution> |
| <phase>generate-sources</phase> |
| <goals> |
| <goal>run</goal> |
| </goals> |
| <configuration> |
| <target> |
| <property name="compile_classpath" refid="maven.compile.classpath" /> |
| <fileset id="gen.path" dir="../src/main/java/core" includes="*.gen" /> |
| <pathconvert pathsep=" " property="gen.files" refid="gen.path" /> |
| <java classname="org.apache.mrql.gen.Main" classpath="../lib/gen-${project.version}.jar:${compile_classpath}"> |
| <arg line="${gen.files}" /> |
| <arg line="-o" /> |
| <arg file="${project.build.directory}/generated-sources/org/apache/mrql" /> |
| </java> |
| <fileset id="mr.gen.path" dir="../src/main/java/spark" includes="*.gen" /> |
| <pathconvert pathsep=" " property="mr.gen.files" refid="mr.gen.path" /> |
| <java classname="org.apache.mrql.gen.Main" classpath="../lib/gen-${project.version}.jar:${compile_classpath}"> |
| <arg line="${mr.gen.files}" /> |
| <arg line="-o" /> |
| <arg file="${project.build.directory}/generated-sources/org/apache/mrql" /> |
| </java> |
| <java classname="org.apache.mrql.gen.Main" classpath="../lib/gen-${project.version}.jar:${compile_classpath}"> |
| <arg file="../src/main/java/core/mrql.cgen" /> |
| <arg line="-o" /> |
| <arg file="${project.build.directory}/generated-sources/mrql.cup" /> |
| </java> |
| <taskdef name="cup" classname="java_cup.anttask.CUPTask" classpathref="maven.compile.classpath" /> |
| <cup srcfile="${project.build.directory}/generated-sources/mrql.cup" destdir="${project.build.directory}/generated-sources" nosummary="true" parser="MRQLParser" /> |
| <cup srcfile="src/main/java/core/JSON.cup" destdir="${project.build.directory}/generated-sources" nosummary="true" parser="JSONParser" symbols="jsym" /> |
| </target> |
| </configuration> |
| </execution> |
| <execution> |
| <id>validate</id> |
| <phase>verify</phase> |
| <goals> |
| <goal>run</goal> |
| </goals> |
| <configuration> |
| <target name="validate_spark" description="Validate all test queries on Spark"> |
| <property name="runtime_classpath" refid="maven.runtime.classpath" /> |
| <echo message="Evaluating test queries in Spark local mode:" /> |
| <java classname="org.apache.mrql.Test" classpath="../lib/mrql-spark-${project.version}.jar:${runtime_classpath}" dir=".." fork="yes" error="/dev/null"> |
| <arg line="-local" /> |
| <arg file="../tests/queries" /> |
| <arg file="../tests/results/spark" /> |
| <arg file="../tests/error_log.txt" /> |
| </java> |
| </target> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| </plugins> |
| </build> |
| </project> |