简体   繁体   English

Maven错误:无法执行目标org.codehaus.mojo:exec-maven-plugin:1.2.1:exec

[英]Maven error: Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec

I'm using netbeans. 我正在使用netbeans。 I tried to reinstall it but it did not work. 我试图重新安装它,但是没有用。 Following is the stack trace when I run mvn clean install -X: 以下是我运行mvn clean install -X时的堆栈跟踪:

Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 1
        at org.neuroph.util.NeurophArrayList.get(NeurophArrayList.java:376)
        at org.neuroph.core.Layer.getNeuronAt(Layer.java:230)
        at org.neuroph.util.ConnectionFactory.forwardConnect(ConnectionFactory.java:231)
        at neuralNetwork.util.NeuralNetworkBuilder.customStandardNNet(NeuralNetworkBuilder.java:34)
        at com.mycompany.redneuronal.redNeuronal.main(redNeuronal.java:25)
------------------------------------------------------------------------
BUILD FAILURE
------------------------------------------------------------------------
Total time: 1.157s
Finished at: Sun Mar 04 17:00:22 ART 2018
Final Memory: 5M/123M
------------------------------------------------------------------------
Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec (default-cli) on project perceptron: Command execution failed. Process exited with an error: 1 (Exit value: 1) -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec (default-cli) on project perceptron: Command execution failed.
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.MojoExecutionException: Command execution failed.
        at org.codehaus.mojo.exec.ExecMojo.execute(ExecMojo.java:362)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
        ... 19 more
Caused by: org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)
        at org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:377)
        at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:160)
        at org.codehaus.mojo.exec.ExecMojo.executeCommandLine(ExecMojo.java:610)
        at org.codehaus.mojo.exec.ExecMojo.execute(ExecMojo.java:352)
        ... 21 more

Also I tried to reinstall maiven and delete my local repository. 我也尝试重新安装maiven并删除我的本地存储库。 I'd be grateful if you could help me. 如果您能帮助我,我将不胜感激。

Solved by upgrading exec-maven-plugin 1.2.1 to 1.6.0 on my NetBeans project. 通过在我的NetBeans项目上将exec-maven-plugin 1.2.1升级到1.6.0来解决。

You can do this the following way: 您可以通过以下方式执行此操作:

Project > Properties > Actions

Once there, select run proyect and replace "org.codehaus.mojo:exec-maven-plugin:1.2.1:exec" with "org.codehaus.mojo:exec-maven-plugin:1.6.0:exec". 在那里,选择运行proyect并将“ org.codehaus.mojo:exec-maven-plugin:1.2.1:exec”替换为“ org.codehaus.mojo:exec-maven-plugin:1.6.0:exec”。

Check the following 检查以下内容

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 netbeans运行错误:无法执行目标org.codehaus.mojo:exec-maven-plugin:1.2.1 - netbeans Run error :Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1 Smooks-无法执行目标org.codehaus.mojo:exec-maven-plugin:1.2.1:exec - Smooks - Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec 无法执行目标org.codehaus.mojo:exec-maven-plugin:1.2.1:exec( - Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec ( 无法执行目标org.codehaus.mojo:exec-maven-plugin:1.2.1:exec - Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec 无法执行目标org.codehaus.mojo:exec-maven-plugin:1.2.1 - kafka风暴集成 - Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1 - kafka storm integration Maven 不会运行我的项目:无法执行目标 org.codehaus.mojo:exec-maven-plugin:1.2.1:exec - Maven won't run my Project : Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec 无法在项目上执行目标org.codehaus.mojo:exec-maven-plugin:1.2.1:exec(default-cli):命令执行失败 - Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec (default-cli) on project: Command execution failed Eclipse:无法执行目标org.codehaus.mojo:exec-maven-plugin:1.2.1:exec(默认值):命令执行失败 - Eclipse: Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec (default): Command execution failed 无法在项目SpringData上执行目标org.codehaus.mojo:exec-maven-plugin:1.2.1:exec(default-cli) - Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec (default-cli) on project SpringData 我尝试运行我的Maven项目时遇到错误:无法执行目标org.codehaus.mojo:exec-maven-plugin:1.2.1:exec(default-cli) - I have an error when i trying to run my maven project: Failed execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec (default-cli)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM