【问题标题】:netbeans Run error :Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1netbeans 运行错误:无法执行目标 org.codehaus.mojo:exec-maven-plugin:1.2.1
【发布时间】:2015-10-01 21:24:36
【问题描述】:

我是 net-beans 8.0.2 的新手,想运行 java 示例,但运行后出现以下错误:

Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec (default-cli) on project MachineLearning: Command execution failed. Process exited with an error: 1 (Exit value: 1) -> [Help 1]

To see the full stack trace of the errors, re-run Maven with the -e switch.
Re-run Maven using the -X switch to enable full debug logging.

For more information about the errors and possible solutions, please read the following articles:
[Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

这是 pom.xml :

<?xml version="1.0" encoding="UTF-8"?>
<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>
    <groupId>com.artificog</groupId>
    <artifactId>MachineLearning</artifactId>
    <version>1.0-SNAPSHOT</version>
    <packaging>jar</packaging>
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.source>1.7</maven.compiler.source>
        <maven.compiler.target>1.7</maven.compiler.target>
    </properties>
  <dependencies>
      <dependency>
    <groupId>org.apache.commons</groupId>
    <artifactId>commons-math</artifactId>
    <version>2.2</version>
    </dependency>
    <dependency>
    <groupId>org.apache.commons</groupId>
    <artifactId>commons-io</artifactId>
    <version>1.3.2</version>
</dependency>
  </dependencies>

</project>

我需要安装一些东西吗? 任何帮助表示赞赏。

-谢谢

编辑:关闭 net-beans 并打开 anaconda 解决了问题。

【问题讨论】:

    标签: java maven netbeans mojo


    【解决方案1】:

    只要由于任何原因无法运行,就会显示该错误消息。它前面是更具体的错误消息。因此,要了解更多信息,只需向上滚动即可。

    这很可能是构建错误,因此请在项目选项卡中为每个带有红色感叹号的源文件找到编辑器窗口右侧的红线并修复这些线。

    【讨论】:

    • 感谢您的回复,我通过安装,创建数据库和成功连接步骤的JDBC连接线上有感叹号,目前没有错误但仍然构建失败:启动程序...线程“主”java.lang.IndexOutOfBoundsException 中的异常:索引:0,大小:0 在 java.util.ArrayList.rangeCheck(ArrayList.java:653) 在 java.util.ArrayList.get(ArrayList.java:429) 在com.artificog.machinelearning.Main.run(Main.java:60) at com.artificog.machinelearning.Main.main(Main.java:42) 构建失败怎么办?+谢谢
    猜你喜欢
    • 1970-01-01
    • 2013-09-07
    • 2014-03-10
    • 2014-01-25
    • 2013-12-03
    • 2016-11-24
    • 1970-01-01
    • 2014-07-20
    • 2013-12-27
    相关资源
    最近更新 更多