Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1 - kafka storm integration

15,952

The element mainClass is empty because the property storm.topology has no value, this is why you get an error.

You have to pass the storm.topology parameter instead of mainClass :

mvn -e -f m2-pom.xml compile exec:java -Dstorm.topology=storm.starter.MainTopology

See the Maven section of the readme of this example for more information: https://github.com/nathanmarz/storm-starter

Share:
15,952
user2728024
Author by

user2728024

Updated on June 10, 2022

Comments

  • user2728024
    user2728024 almost 2 years

    I am working on kafka strom integration. Im stuck with an error. The Build Fails when I try to Run it using
    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
    

    This is a snippet of the pom.xml file:

    <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>
    

    I tried

    rm -rf ~/.m2/
    mvn clean install
    

    I am using storm-0.9.0-rc3 and kafka-0.7.2