我是Maven的新手,正在尝试使用
以下是我的构建输出:
exec:java
运行一个项目。我的构建失败了,可能是因为我没有安装exec插件。我已经下载了插件(http://mvnrepository.com/artifact/org.codehaus.mojo/exec-maven-plugin),但现在我不知道该如何在Eclipse中使用它。我尝试将其添加到构建路径中,但似乎没有起作用。这可能是一个非常愚蠢的问题,但我该如何让插件正常工作呢?以下是我的构建输出:
[INFO] Scanning for projects...
[INFO]
[INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Twitter2 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- exec-maven-plugin:1.4.0:java (default-cli) @ Twitter2 ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.826 s
[INFO] Finished at: 2015-06-11T14:24:29-06:00
[INFO] Final Memory: 10M/114M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.4.0:java (default-cli) on project Twitter2: The parameters 'mainClass' for goal org.codehaus.mojo:exec-maven-plugin:1.4.0:java are missing or invalid -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginParameterException
[WARNING] Some problems were encountered while building the effective model for Test:Twitter2:jar:0.0.1-SNAPSHOT [WARNING] 'build.plugins.plugin.version' for org.codehaus.mojo:exec-maven-plugin is missing. @ line 19, column 14
这是需要我修复的吗? - user<version>1.4.0</version>
来消除它(1.4.0是Maven在构建输出中显示的版本)。 - M A