简体   繁体   English

为什么我会遇到 org.codehaus.mojo:exec-maven-plugin:1.2.1:exec 错误?

[英]Why am I running into org.codehaus.mojo:exec-maven-plugin:1.2.1:exec error?

I have the following simple pom.xml.我有以下简单的 pom.xml。 When I run the application it runs into following error, I read many answers for this problem but they did not work out.当我运行应用程序时,它遇到了以下错误,我阅读了很多关于这个问题的答案,但没有解决。

    ClientConfig config = new DefaultClientConfig();
    Client client = Client.create(config);
    WebResource resource = client.resource("Query Request Goes Here");
    List<Output> allOutputs = resource.get(new GenericType<List<Output>>(){});
    System.out.println(allOutputs.size());



Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec (default-cli) on project eBaytest: 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.

POM.XML POM.XML

<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>Test</artifactId>
    <version>1.0-SNAPSHOT</version>
    <packaging>jar</packaging>

    <name>eBaytest</name>
    <url>http://maven.apache.org</url>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <dependencies>
        <dependency>
            <groupId>com.sun.jersey</groupId>
            <artifactId>jersey-client</artifactId>
            <version>1.18</version>
            <type>jar</type>
        </dependency>
    </dependencies>
</project>

It looks like you're trying to set up a new Jersey project using Jersey 1.x. 看来您正在尝试使用Jersey 1.x建立一个新泽西项目。 My first recommendation would be to use the latest 2.5.1. 我的第一个建议是使用最新的2.5.1。 Also, you'll definitely want to be able to run Maven from the command line, so install that first. 另外,您肯定希望能够从命令行运行Maven,因此请首先安装它。 When you have that, follow these instructions to set up a new Jersey project, basically: 有了这些信息后,基本上,请按照以下说明设置新泽西州项目:

mvn archetype:generate -DarchetypeArtifactId=jersey-quickstart-grizzly2 \
-DarchetypeGroupId=org.glassfish.jersey.archetypes -DinteractiveMode=false \
-DgroupId=com.example -DartifactId=simple-service -Dpackage=com.example \
-DarchetypeVersion=2.5.1

After that, make your changes and run: 之后,进行更改并运行:

mvn -e compile exec:java

If you get any errors then, you can come back here and share them with us. 如果您有任何错误,可以回到这里与我们分享。

if you trying create new model table, and by mistake add two @id column tag sometime this error occurs, check the model class and delete unnecessary one the problem will disappear.如果您尝试创建新的 model 表,并且在出现此错误时错误地添加了两个 @id 列标记,请检查 model class 并删除不必要的一个,问题将消失。

暂无
暂无

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

相关问题 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 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 我尝试运行我的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) 无法执行目标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
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM