org.codehaus.mojo:exec-maven-plugin:1.2.1:exec由于某些原因而执行失败。

时间:2018-10-18 17:05:31

标签: java maven

由于某种原因,我的POM文件无法正常工作。当我尝试在我的klient课上做某事时,我得到了整个消息:

  

无法在项目KlientProject上执行目标org.codehaus.mojo:exec-maven-plugin:1.2.1:exec(default-cli):命令执行失败。进程退出并出现错误:1(退出值:1)-> [帮助1]   org.apache.maven.lifecycle.LifecycleExecutionException:无法在项目KlientProject上执行目标org.codehaus.mojo:exec-maven-plugin:1.2.1:exec(default-cli):命令执行失败。       在org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)       在org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)       在org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)       在org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)       在org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)       在org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)       在org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)       在org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)       在org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)       在org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)       在org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)       在org.apache.maven.cli.MavenCli.main(MavenCli.java:141)       在sun.reflect.NativeMethodAccessorImpl.invoke0(本机方法)处       在sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)       在sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)       在java.lang.reflect.Method.invoke(Method.java:498)       在org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)       在org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)       在org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)       在org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)   原因:org.apache.maven.plugin.MojoExecutionException:命令执行失败。       在org.codehaus.mojo.exec.ExecMojo.execute(ExecMojo.java:362)       在org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)       在org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)       ...另外19个   原因:org.apache.commons.exec.ExecuteException:进程退出,错误为1(退出值:1)       在org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:377)       在org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:160)       在org.codehaus.mojo.exec.ExecMojo.executeCommandLine(ExecMojo.java:610)       在org.codehaus.mojo.exec.ExecMojo.execute(ExecMojo.java:352)       ...还有21

有关错误和可能的解决方案的更多信息,请阅读以下文章: [帮助1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

这是我的pom文件:

<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.mycompany</groupId>
<artifactId>KlientProject</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.target>1.8</maven.compiler.target>
</properties>
<dependencies>
    <dependency>
        <groupId>com.sun.jersey</groupId>
        <artifactId>jersey-client</artifactId>
        <version>1.19.4</version>
    </dependency>
    <dependency>
        <groupId>javax</groupId>
        <artifactId>javaee-web-api</artifactId>
        <version>7.0</version>
        <type>jar</type>
    </dependency>
    <dependency>
        <groupId>com.sun.jersey</groupId>
        <artifactId>jersey-json</artifactId>
        <version>1.17.1</version>
    </dependency>
    <dependency>
        <groupId>com.google.code.gson</groupId>
        <artifactId>gson</artifactId>
        <version>2.8.2</version>
    </dependency>
    <dependency>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>exec-maven-plugin</artifactId>
        <version>1.2</version>
    </dependency>
</dependencies>

有人知道为什么吗?

0 个答案:

没有答案