blob: 1ae902a28bb2178f72bc11a8370550ac3ae7a47c [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">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>storm</artifactId>
<groupId>org.apache.storm</groupId>
<version>2.2.0-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
<artifactId>storm-core</artifactId>
<packaging>jar</packaging>
<name>Storm Core</name>
<description>Storm Core Java API and Clojure implementation.</description>
<properties>
<worker-launcher.conf.dir>/etc/storm</worker-launcher.conf.dir>
<worker-launcher.build.dir>${project.build.directory}/native/worker-launcher</worker-launcher.build.dir>
<worker-launcher.additional_cflags />
<argLine />
<conjure.version>2.1.3</conjure.version>
</properties>
<dependencies>
<dependency>
<groupId>org.apache.storm</groupId>
<artifactId>storm-clojure</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.storm</groupId>
<artifactId>storm-server</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.storm</groupId>
<artifactId>storm-server</artifactId>
<version>${project.version}</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<!--Hadoop Mini Cluster cannot use log4j2 bridge,
Surefire has a way to exclude the conflicting log4j API jar
from the classpath, classpathDependencyExcludes, but it didn't work in practice.
This is here as a work around to place it at the beginning of the classpath
even though maven does not officially support ordering of the classpath.-->
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
<scope>test</scope>
</dependency>
<!--clojure-->
<dependency>
<groupId>org.clojure</groupId>
<artifactId>clojure</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.clojure</groupId>
<artifactId>tools.logging</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.clojars.runa</groupId>
<artifactId>conjure</artifactId>
<version>${conjure.version}</version>
<scope>test</scope>
</dependency>
<!--java-->
<dependency>
<groupId>commons-cli</groupId>
<artifactId>commons-cli</artifactId>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
</dependency>
<dependency>
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>log4j-over-slf4j</artifactId>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.storm</groupId>
<artifactId>storm-client</artifactId>
<version>${project.version}</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.awaitility</groupId>
<artifactId>awaitility</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>java-hamcrest</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-server</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-util</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-servlet</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-servlets</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-smile</artifactId>
</dependency>
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
</dependency>
<dependency>
<!--
hadoop-auth is needed in storm-core because ui in a secured storm cluster needs it for authentication.
Please DO NOT REMOVE this dependency
-->
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-auth</artifactId>
<version>${hadoop.version}</version>
<exclusions>
<exclusion>
<groupId>org.apache.directory.server</groupId>
<artifactId>apacheds-kerberos-codec</artifactId>
</exclusion>
<exclusion>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</exclusion>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</exclusion>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
<build>
<sourceDirectory>src/jvm</sourceDirectory>
<testSourceDirectory>test/jvm</testSourceDirectory>
<resources>
<resource>
<directory>../</directory>
<targetPath>META-INF</targetPath>
<includes>
<!--
storm-core doesn't package jquery, etc. so the stock
apache LICENSE file is okay. We do want our version
of the NOTICE file, however
-->
<include>NOTICE</include>
</includes>
</resource>
<resource>
<directory>${basedir}/src/resources</directory>
<excludes>
<exclude>storm-core-version-info.properties</exclude>
</excludes>
<filtering>false</filtering>
</resource>
<resource>
<directory>${basedir}/src/resources</directory>
<includes>
<include>storm-core-version-info.properties</include>
</includes>
<filtering>true</filtering>
</resource>
</resources>
<testResources>
<testResource>
<directory>src/dev</directory>
</testResource>
<testResource>
<directory>test/resources</directory>
</testResource>
</testResources>
<plugins>
<plugin>
<groupId>com.theoryinpractise</groupId>
<artifactId>clojure-maven-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<testSourceDirectories>
<testSourceDirectory>test/clj</testSourceDirectory>
</testSourceDirectories>
<warnOnReflection>false</warnOnReflection>
<copyDeclaredNamespaceOnly>true</copyDeclaredNamespaceOnly>
<copiedNamespaces>
<copiedNamespace>none</copiedNamespace>
</copiedNamespaces>
</configuration>
<executions>
<execution>
<id>test-clojure</id>
<phase>test</phase>
<goals>
<goal>test</goal>
</goals>
<configuration>
<junitOutput>true</junitOutput>
<testScript>../storm-clojure/test/resources/test_runner.clj</testScript>
<!-- argLine is set by JaCoCo for code coverage -->
<vmargs>-Xmx1536m ${argLine} ${test.extra.args}</vmargs>
<!-- Run clojure unit tests or all tests (including integration tests) depending on the profile enabled -->
<testNamespaces>
<testNamespace>${clojure.test.set}</testNamespace>
</testNamespaces>
<testDeclaredNamespaceOnly>${clojure.test.declared.namespace.only}</testDeclaredNamespaceOnly>
<configuration>
<clojureOptions>-Dstorm.home=${project.basedir}/target/testhome</clojureOptions>
</configuration>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<!--Note - the version would be inherited-->
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<configuration>
<reportsDirectories>
<file>${project.build.directory}/test-reports</file>
</reportsDirectories>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<configuration>
<reportsDirectory>${project.build.directory}/test-reports</reportsDirectory>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.storm</groupId>
<artifactId>storm-maven-plugins</artifactId>
<version>${project.version}</version>
<executions>
<execution>
<id>version-info</id>
<phase>generate-resources</phase>
<goals>
<goal>version-info</goal>
</goals>
<configuration>
<source>
<directory>${basedir}/src/</directory>
<includes>
<include>jvm/**/*.java</include>
</includes>
</source>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<overWriteReleases>false</overWriteReleases>
<overWriteSnapshots>false</overWriteSnapshots>
<overWriteIfNewer>true</overWriteIfNewer>
<includeScope>runtime</includeScope>
</configuration>
</execution>
<!-- multi-lang resources -->
<execution>
<id>unpack</id>
<phase>process-test-resources</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.apache.storm</groupId>
<artifactId>multilang-ruby</artifactId>
<version>${project.version}</version>
</artifactItem>
<artifactItem>
<groupId>org.apache.storm</groupId>
<artifactId>multilang-python</artifactId>
<version>${project.version}</version>
</artifactItem>
<artifactItem>
<groupId>org.apache.storm</groupId>
<artifactId>multilang-javascript</artifactId>
<version>${project.version}</version>
</artifactItem>
</artifactItems>
<outputDirectory>${project.build.directory}/test-classes</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<!-- avoid warning about recursion -->
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>coverage</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>pre-test-jacoco-clean</id>
<phase>process-test-classes</phase>
<configuration>
<tasks>
<delete file="target\jacoco.exec" />
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.7.2.201409121644</version>
<executions>
<execution>
<id>prepare-agent</id>
<goals>
<goal>prepare-agent</goal>
</goals>
<configuration>
<append>true</append>
<excludes>
<exclude>org/apache/storm/metric/api/IMetricsConsumer$DataPointFieldAccess</exclude>
<exclude>org/apache/storm/metric/api/IMetricsConsumer$TaskInfoFieldAccess</exclude>
<exclude>org/apache/storm/testing/TestSerObjectFieldAccess</exclude>
</excludes>
</configuration>
</execution>
<execution>
<id>report</id>
<phase>prepare-package</phase>
<goals>
<goal>report</goal>
</goals>
<configuration>
<excludes>
<exclude>org/apache/storm/generated/*</exclude> <!--Thrift generated code-->
</excludes>
<includes>
<include>backtype/*/*/*/*</include>
<include>backtype/*/*/*</include>
<include>backtype/*/*</include>
<include>backtype/*</include>
<include>zilch/*</include>
<include>storm/*/*/*/*</include>
<include>storm/*/*/*</include>
<include>storm/*/*</include>
<include>storm/*</include>
</includes>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>native</id>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>sh</executable>
<arguments>
<argument>-c</argument>
<argument>mkdir -p ${project.build.directory}/; cp -rufv ${basedir}/src/native/ ${project.build.directory}/</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>compile</id>
<phase>compile</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>sh</executable>
<arguments>
<argument>compile-worker-launcher.sh</argument>
</arguments>
<workingDirectory>${worker-launcher.build.dir}</workingDirectory>
</configuration>
</execution>
<execution>
<id>test</id>
<phase>test</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>make</executable>
<arguments>
<argument>check</argument>
</arguments>
<workingDirectory>${worker-launcher.build.dir}</workingDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>copy-build-scripts</id>
<phase>process-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<resources>
<resource>
<directory>src/resources</directory>
<includes>
<include>compile-worker-launcher.sh</include>
</includes>
<filtering>true</filtering>
</resource>
</resources>
<outputDirectory>${worker-launcher.build.dir}</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
</profile>
</profiles>
</project>