blob: dcc502487aecfb22a9910eaaa725f7fdd730ba11 [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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.mahout</groupId>
<artifactId>mahout-community</artifactId>
<version>14.1-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>mahout-spark-cli-drivers_2.11</artifactId>
<name>- Mahout Spark CLI Drivers</name>
<description>These drivers will allow you to compile a handy Apache Spark App which utilizes Apache Mahout.
</description>
<packaging>jar</packaging>
<!-- per http://www.apache.org/dev/publishing-maven-artifacts.html#prepare-poms ensure that all poms have SCM managment.-->
<!-- <scm>
<connection>scm:git:git@github.com:apache/mahout.git</connection>
<developerConnection>scm:git:https://gitbox.apache.org/repos/asf/mahout.git</developerConnection>
<url>https://gitbox.apache.org/repos/asf?p=mahout.git;a=tree;h=refs/heads/${project.scm.tag};hb=${project.scm.tag}</url>
<tag>mahout-14.1
</tag>
</scm>
-->
<properties>
<maven.javadoc.skip>true</maven.javadoc.skip>
</properties>
<dependencies>
<dependency>
<groupId>org.scalatest</groupId>
<artifactId>scalatest_2.11</artifactId>
</dependency>
<!-- <dependency>-->
<!-- <groupId>com.github.scopt</groupId>-->
<!-- <artifactId>scopt_${scala.compat.version}</artifactId>-->
<!-- <version>3.3.0</version>-->
<!-- </dependency>-->
<!-- https://mvnrepository.com/artifact/com.github.scopt/scopt -->
<dependency>
<groupId>com.github.scopt</groupId>
<artifactId>scopt_${scala.compat.version}</artifactId>
<version>3.7.1</version>
</dependency>
<!-- our stuff -->
<dependency>
<groupId>org.apache.mahout</groupId>
<artifactId>mahout-spark_2.11</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.mahout</groupId>
<artifactId>mahout-core_2.11</artifactId>
<version>${project.version}</version>
<classifier>tests</classifier>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.mahout</groupId>
<artifactId>mahout-spark_2.11</artifactId>
<version>${project.version}</version>
<classifier>tests</classifier>
</dependency>
</dependencies>
<build>
<plugins>
<!--
&lt;!&ndash; create fat jar &ndash;&gt;
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<id>dependency-reduced</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<descriptors>
<descriptor>"${project.home}/src/main/assembly/dependency-reduced.xml"</descriptor>
</descriptors>
</configuration>
</execution>
</executions>
</plugin>
-->
<!-- ensure licenses -->
<plugin>
<groupId>org.apache.rat</groupId>
<artifactId>apache-rat-plugin</artifactId>
</plugin>
<!-- <plugin>-->
<!-- <groupId>org.codehaus.mojo</groupId>-->
<!-- <artifactId>exec-maven-plugin</artifactId>-->
<!-- <version>${org.codehaus.mojo.version}</version>-->
<!-- <executions>-->
<!-- <execution>-->
<!-- <id>script-chmod</id>-->
<!-- <phase>package</phase>-->
<!-- <configuration>-->
<!-- <executable>chmod</executable>-->
<!-- <arguments>-->
<!-- <argument>+x</argument>-->
<!-- <argument>"target/spark-cli-drivers_${scala.compat.version}-${project.version}.jar"</argument>-->
<!-- <argument>"target/spark_${scala.compat.version}-${project.version}-dependency-reduced.jar"</argument>-->
<!-- </arguments>-->
<!-- </configuration>-->
<!-- <goals>-->
<!-- <goal>run</goal>-->
<!-- </goals>-->
<!-- </execution>-->
<!-- </executions>-->
<!-- </plugin>-->
<!-- copy jars to lib/ -->
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.4</version>
<executions>
<execution>
<id>copy</id>
<phase>package</phase>
<configuration>
<tasks>
<copy file="target/mahout-spark-cli-drivers_${scala.compat.version}-${project.version}.jar" tofile="${project.basedir}/../../lib/mahout-spark-cli-drivers_${scala.compat.version}-${project.version}.jar" />
<!-- <copy file="target/spark-cli-drivers_${scala.compat.version}-${project.version}-dependency-reduced.jar" tofile="${project.basedir}/../../lib/spark_${scala.compat.version}-${project.version}-dependency-reduced.jar" /> -->
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- delete files on mvn clean -->
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>3.0.0</version>
<configuration>
<filesets>
<fileset>
<directory>${project.build.directory}/lib/</directory>
<includes>
<include>spark-cli*</include>
<include>spark_*-dependency-reduced.jar</include>
</includes>
<followSymlinks>false</followSymlinks>
</fileset>
<fileset>
<directory>${project.build.directory}/community/spark-cli-drivers/target/</directory>
<includes>
<include>spark_*</include>
<include>spark_*-dependency-reduced.jar</include>
</includes>
<followSymlinks>false</followSymlinks>
</fileset>
</filesets>
</configuration>
</plugin>
<!-- scala stuff -->
<plugin>
<groupId>net.alchim31.maven</groupId>
<artifactId>scala-maven-plugin</artifactId>
<version>4.0.2</version>
<executions>
<execution>
<id>add-scala-sources</id>
<phase>initialize</phase>
<goals>
<goal>add-source</goal>
</goals>
</execution>
<execution>
<id>scala-compile</id>
<phase>process-resources</phase>
<goals>
<goal>compile</goal>
</goals>
</execution>
<execution>
<id>scala-test-compile</id>
<phase>process-test-resources</phase>
<goals>
<goal>testCompile</goal>
</goals>
</execution>
</executions>
</plugin>
<!--this is what scalatest recommends to do to enable scala tests -->
<!-- disable surefire -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<systemPropertyVariables>
<mahout.home>${project.build.directory}</mahout.home>
</systemPropertyVariables>
<skipTests>true</skipTests>
</configuration>
</plugin>
<!-- enable scalatest -->
<plugin>
<groupId>org.scalatest</groupId>
<artifactId>scalatest-maven-plugin</artifactId>
<version>${scalatest.maven.plugin.version}</version>
<executions>
<execution>
<id>test</id>
<goals>
<goal>test</goal>
</goals>
</execution>
</executions>
<configuration>
<systemProperties>
<mahout.home>${project.build.directory}</mahout.home>
</systemProperties>
<argLine>-Xmx4g</argLine>
</configuration>
</plugin>
</plugins>
</build>
</project>