无法执行目标org.codehaus.mojo:exec-maven-plugin

时间:2014-08-08 11:22:54

标签: java maven pom.xml

我试图执行一个java文件,当我这样做时,我收到了这条消息:

Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.3.2:java (default-cli) on project PruebaMaven: An exception occured while executing the Java class. null: InvocationTargetException: NullPointerException -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.3.2:java (default-cli) on project PruebaMaven: An exception occured while executing the Java class. null

我有这个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>grupo.prog</groupId>
  <artifactId>PruebaMaven</artifactId>
  <version>1.0-SNAPSHOT</version>
  <packaging>jar</packaging>

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

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

  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>3.8.1</version>
      <scope>test</scope>
    </dependency>

    <dependency>
    <groupId>org.apache.hive</groupId>
    <artifactId>hive-jdbc</artifactId>
    <version>0.13.1</version>
    <scope>runtime</scope>
    </dependency>    

<dependency>
    <groupId>org.apache.hive</groupId>
    <artifactId>hive-metastore</artifactId>
    <version>0.13.1</version>
</dependency>

<dependency>
    <groupId>org.apache.hive</groupId>
    <artifactId>hive-service</artifactId>
    <version>0.13.1</version>
</dependency>

<dependency>
    <groupId>org.apache.hive</groupId>
    <artifactId>hive-common</artifactId>
    <version>0.13.1</version>
    <scope>runtime</scope>
</dependency>

<dependency>
    <groupId>org.apache.hive</groupId>
    <artifactId>hive-beeline</artifactId>
    <version>0.13.1</version>
    <scope>runtime</scope>
</dependency>

<dependency>
    <groupId>org.apache.hive</groupId>
    <artifactId>hive-shims</artifactId>
    <version>0.13.1</version>
    <scope>runtime</scope>
</dependency>

<dependency>
    <groupId>org.apache.thrift</groupId>
    <artifactId>libthrift</artifactId>
    <version>0.9.0</version>
</dependency>

<dependency>
    <groupId>org.apache.hive</groupId>
    <artifactId>hive-serde</artifactId>
    <version>0.13.1</version>
    <scope>runtime</scope>
</dependency>

<dependency>
    <groupId>org.apache.hadoop</groupId>
    <artifactId>hadoop-core</artifactId>
    <version>1.2.1</version>
</dependency>

 <dependency>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
</dependency>

  </dependencies>

<build>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>exec-maven-plugin</artifactId>
        <version>1.2.1</version>
                        <configuration>
                                    <mainClass>HiveClient.java</mainClass> 
                        </configuration>
            </plugin>
   </plugins>
</build>


</project>

我也在这个论坛上看过其他帖子,但是他们不适应我的确切情况,或者他们不起作用。感谢。

0 个答案:

没有答案