问题
After i wrote
mvn -f pom.xml compile exec:java -Dexec.classpathScope=Compile-Dexec.main Class=storm.starter.WordCountTopology
and found this !!
[INFO] One or more required plugin parameters are invalid/missing for 'exec:java'
[0] Inside the definition for plugin 'exec-maven-plugin' specify the following:
... VALUE
-OR-
on the command line, specify: '-Dstorm.topology=VALUE
回答1:
If you link your pom.xml then this would be easier. I'm guessing you're using Storm. Have you written your own topologyClass
? From the documentation:
topologyClass
The class name of the topology driver (e.g. "com.foo.bar.MyTopology") Command line override: -Dmaven.storm.topology=
The documentation also gives you the code for your pom but you might want to add exec-maven-plugin to your pom.xml like so:
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<configuration>
<mainClass>com.domain.yourApp</mainClass>
</configuration>
</plugin>
</plugins>
</build>
One thing to note: you need to alter mainClass
to match the class in your project that contains the main method you want to execute.
Then you can just run mvn exec:java
.
来源:https://stackoverflow.com/questions/20736366/error-in-maven-building