4

私はkafka stromの統合に取り組んでいます。エラーで立ち往生しています。を使用して実行しようとすると、ビルドが失敗します
mvn -e -f m2-pom.xml compile exec:java -Dexec.classpathScope=compile -Dexec.mainClass=storm.starter.MainTopology

[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:java  
(default-cli) on project storm-starter: The parameters 'mainClass' for goal 
 org.codehaus.mojo:exec-maven-plugin:1.2.1:java are missing or invalid

これは、pom.xml ファイルのスニペットです。

<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>true</includePluginDependencies>
      <classpathScope>compile</classpathScope>
      <mainClass>${storm.topology}</mainClass>
    </configuration>
</plugin>

私は試した

rm -rf ~/.m2/
mvn clean install

私は storm-0.9.0-rc3 と kafka-0.7.2 を使用しています

4

2 に答える 2

0

この行を追加してみてください。

    <execution>
        <phase>package</phase> <!-- Add this -->
    <goals>
        .....
        .....
于 2013-12-11T21:22:48.317 に答える