Apache storm storm starter中缺少Apache storm 9.2

Apache storm storm starter中缺少Apache storm 9.2,apache-storm,Apache Storm,我从github下载storm starter: 缺少一个依赖项: <dependency> <groupId>org.apache.storm</groupId> <artifactId>storm-core</artifactId> <version>0.9.2-incubating-SNAPSHOT</version> <!-- keep storm out of the jar-w

我从github下载storm starter:

缺少一个依赖项:

<dependency>
  <groupId>org.apache.storm</groupId>
  <artifactId>storm-core</artifactId>
  <version>0.9.2-incubating-SNAPSHOT</version>
  <!-- keep storm out of the jar-with-dependencies -->
  <scope>provided</scope>
</dependency>

org.apache.storm
风暴核心
0.9.2-孵化-快照
假如
使用0.9.1-孵化meven解决依赖关系。 我可以在storm starter示例中使用它吗?
有不兼容吗

尝试以下依赖项

<dependency>
<groupId>storm</groupId>
<artifactId>storm</artifactId>
<version>0.9.1</version>
</dependency>

暴风雨
暴风雨
0.9.1

我就是这样解决这个问题的

首先,您必须使用版本0.9.1-incubating(使用“0.9.2-incubating-SNAPSHOT”maven无法解决依赖性)

其次,使用eclipse添加org.eclipse.m2e插件。 请注意下面的评论:

<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->

事实并非如此 看来标签

<versionRange>[1.3.18,)</versionRange>
[1.3.18,]
导致下载版本1.3.18 插件“clojure maven plugin”的名称。 这会导致org.apache.zookeeper.server.NIOServerCnxn$Factory出现ClassNotFound异常

要解决这个问题,您可以强制使用clojure maven插件的1.3.8版。 或者将org.eclipse.m2e插件的版本范围设置为[1.3.8,)

这里是我的工作pom.xml:

<?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>0.9.1-incubating</version>
      <relativePath>../../pom.xml</relativePath>
  </parent>

  <groupId>org.apache.storm</groupId>
  <artifactId>storm-starter</artifactId>
  <packaging>jar</packaging>

  <name>storm-starter</name>


  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.11</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.testng</groupId>
      <artifactId>testng</artifactId>
      <version>6.8.5</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-all</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.easytesting</groupId>
      <artifactId>fest-assert-core</artifactId>
      <version>2.0M8</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.jmock</groupId>
      <artifactId>jmock</artifactId>
      <version>2.6.0</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.storm</groupId>
      <artifactId>storm-core</artifactId>
      <version>${project.version}</version>
      <!-- keep storm out of the jar-with-dependencies -->
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>commons-collections</groupId>
      <artifactId>commons-collections</artifactId>
      <version>3.2.1</version>
    </dependency>
    <dependency>
      <groupId>com.google.guava</groupId>
      <artifactId>guava</artifactId>
    </dependency>
  </dependencies>

  <build>
    <sourceDirectory>src/jvm</sourceDirectory>
    <testSourceDirectory>test/jvm</testSourceDirectory>
    <resources>
      <resource>
        <directory>${basedir}/multilang</directory>
      </resource>
    </resources>

    <plugins>
      <!--
        Bind the maven-assembly-plugin to the package phase
        this will create a jar file without the storm dependencies
        suitable for deployment to a cluster.
       -->
      <plugin>
        <artifactId>maven-assembly-plugin</artifactId>
        <configuration>
          <descriptorRefs>
            <descriptorRef>jar-with-dependencies</descriptorRef>
          </descriptorRefs>
          <archive>
            <manifest>
              <mainClass></mainClass>
            </manifest>
          </archive>
        </configuration>
        <executions>
          <execution>
            <id>make-assembly</id>
            <phase>package</phase>
            <goals>
              <goal>single</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>com.theoryinpractise</groupId>
        <artifactId>clojure-maven-plugin</artifactId>
        <version>1.3.8</version>
        <extensions>true</extensions>
        <configuration>
          <sourceDirectories>
            <sourceDirectory>src/clj</sourceDirectory>
          </sourceDirectories>
        </configuration>
        <executions>
          <execution>
            <id>compile</id>
            <phase>compile</phase>
            <goals>
              <goal>compile</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>exec-maven-plugin</artifactId>
        <version>1.2.1</version>
        <executions>
          <execution>
            <goals>
              <goal>exec</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <executable>java</executable>
          <includeProjectDependencies>true</includeProjectDependencies>
          <includePluginDependencies>false</includePluginDependencies>
          <classpathScope>compile</classpathScope>
          <mainClass>${storm.topology}</mainClass>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <source>1.7</source>
          <target>1.7</target>
        </configuration>
      </plugin>
    </plugins>
    <pluginManagement>
        <plugins>
            <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
            <plugin>
                <groupId>org.eclipse.m2e</groupId>
                <artifactId>lifecycle-mapping</artifactId>
                <version>1.0.0</version>
                <configuration>
                    <lifecycleMappingMetadata>
                        <pluginExecutions>
                            <pluginExecution>
                                <pluginExecutionFilter>
                                    <groupId>
                                        com.theoryinpractise
                                    </groupId>
                                    <artifactId>
                                        clojure-maven-plugin
                                    </artifactId>
                                    <versionRange>
                                        [1.3.8,)
                                    </versionRange>
                                    <goals>
                                        <goal>compile</goal>
                                    </goals>
                                </pluginExecutionFilter>
                                <action>
                                    <ignore></ignore>
                                </action>
                            </pluginExecution>
                        </pluginExecutions>
                    </lifecycleMappingMetadata>
                </configuration>
            </plugin>
        </plugins>
    </pluginManagement>
  </build>
</project>

4.0.0
暴风雨
org.apache.storm
0.9.1-孵化
../../pom.xml
org.apache.storm
风暴发起者
罐子
风暴发起者
朱尼特
朱尼特
4.11
测试
org.testng
testng
6.8.5
测试
org.mockito
莫基托所有
测试
org.easytesting
fest断言核心
2.0M8
测试
org.jmock
杰莫克
2.6.0
测试
org.apache.storm
风暴核心
${project.version}
假如
公地收藏
公地收藏
3.2.1
番石榴
番石榴
src/jvm
测试/虚拟机
${basedir}/multilang
maven汇编插件
带有依赖项的jar
组装
包裹
单一的
理论与实践
clojure maven插件
1.3.8
真的
src/clj
编译
编译
编译
org.codehaus.mojo
execmaven插件
1.2.1
执行官
JAVA
真的
假的
编译
${storm.topology}
org.apache.maven.plugins
maven编译器插件
1.7
1.7
org.eclipse.m2e
生命周期映射
1.0.0
理论与实践
clojure maven插件
[1.3.8,)
编译

Hi Amit.抱歉,为什么是0.8.2而不是0.9.1-孵化?抱歉@AndreaZonzin我复制了依赖项并粘贴了它,我编辑了答案,希望它能为您工作。使用0.9.1 maven解决依赖项。但是当我使用maven编译时,它会导致java.lang.ClassNotFoundException:org.apache.zookeeper.server.NIOServerCnxn$FactoryWith“0.9.1”版本,maven仍然无法解决依赖关系。使用“0.9.1-incubating”pom可以,但是使用您建议的“mvn-f m2-pom.xml包”,我仍然存在org.apache.zookeeper.server.NIOServerCnxn$Factory的ClassNotFoundException问题