title: Failed to execute goal org.codehaus.mojo:exec-maven-plugin
body: <p>I'm trying to execute a java file, and when I do I get this message:</p>
  
  <pre><code>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 -&gt; [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
  </code></pre>
  
  <p>I have this pom.xml but it doesn't work yet</p>
  
  <pre><code>&lt;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"&gt;
    &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
    &lt;groupId&gt;grupo.prog&lt;/groupId&gt;
    &lt;artifactId&gt;PruebaMaven&lt;/artifactId&gt;
    &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
    &lt;packaging&gt;jar&lt;/packaging&gt;
  
    &lt;name&gt;PruebaMaven&lt;/name&gt;
    &lt;url&gt;http://maven.apache.org&lt;/url&gt;
  
    &lt;properties&gt;
      &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
    &lt;/properties&gt;
  
    &lt;dependencies&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;junit&lt;/groupId&gt;
        &lt;artifactId&gt;junit&lt;/artifactId&gt;
        &lt;version&gt;3.8.1&lt;/version&gt;
        &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
      &lt;groupId&gt;org.apache.hive&lt;/groupId&gt;
      &lt;artifactId&gt;hive-jdbc&lt;/artifactId&gt;
      &lt;version&gt;0.13.1&lt;/version&gt;
      &lt;scope&gt;runtime&lt;/scope&gt;
      &lt;/dependency&gt;    
  
  &lt;dependency&gt;
      &lt;groupId&gt;org.apache.hive&lt;/groupId&gt;
      &lt;artifactId&gt;hive-metastore&lt;/artifactId&gt;
      &lt;version&gt;0.13.1&lt;/version&gt;
  &lt;/dependency&gt;
  
  &lt;dependency&gt;
      &lt;groupId&gt;org.apache.hive&lt;/groupId&gt;
      &lt;artifactId&gt;hive-service&lt;/artifactId&gt;
      &lt;version&gt;0.13.1&lt;/version&gt;
  &lt;/dependency&gt;
  
  &lt;dependency&gt;
      &lt;groupId&gt;org.apache.hive&lt;/groupId&gt;
      &lt;artifactId&gt;hive-common&lt;/artifactId&gt;
      &lt;version&gt;0.13.1&lt;/version&gt;
      &lt;scope&gt;runtime&lt;/scope&gt;
  &lt;/dependency&gt;
  
  &lt;dependency&gt;
      &lt;groupId&gt;org.apache.hive&lt;/groupId&gt;
      &lt;artifactId&gt;hive-beeline&lt;/artifactId&gt;
      &lt;version&gt;0.13.1&lt;/version&gt;
      &lt;scope&gt;runtime&lt;/scope&gt;
  &lt;/dependency&gt;
  
  &lt;dependency&gt;
      &lt;groupId&gt;org.apache.hive&lt;/groupId&gt;
      &lt;artifactId&gt;hive-shims&lt;/artifactId&gt;
      &lt;version&gt;0.13.1&lt;/version&gt;
      &lt;scope&gt;runtime&lt;/scope&gt;
  &lt;/dependency&gt;
  
  &lt;dependency&gt;
      &lt;groupId&gt;org.apache.thrift&lt;/groupId&gt;
      &lt;artifactId&gt;libthrift&lt;/artifactId&gt;
      &lt;version&gt;0.9.0&lt;/version&gt;
  &lt;/dependency&gt;
  
  &lt;dependency&gt;
      &lt;groupId&gt;org.apache.hive&lt;/groupId&gt;
      &lt;artifactId&gt;hive-serde&lt;/artifactId&gt;
      &lt;version&gt;0.13.1&lt;/version&gt;
      &lt;scope&gt;runtime&lt;/scope&gt;
  &lt;/dependency&gt;
  
  &lt;dependency&gt;
      &lt;groupId&gt;org.apache.hadoop&lt;/groupId&gt;
      &lt;artifactId&gt;hadoop-core&lt;/artifactId&gt;
      &lt;version&gt;1.2.1&lt;/version&gt;
  &lt;/dependency&gt;
  
   &lt;dependency&gt;
  &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
  &lt;artifactId&gt;exec-maven-plugin&lt;/artifactId&gt;
  &lt;version&gt;1.2.1&lt;/version&gt;
  &lt;/dependency&gt;
  
    &lt;/dependencies&gt;
  
  &lt;build&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
                  &lt;artifactId&gt;exec-maven-plugin&lt;/artifactId&gt;
          &lt;version&gt;1.2.1&lt;/version&gt;
                          &lt;configuration&gt;
                                      &lt;mainClass&gt;HiveClient.java&lt;/mainClass&gt; 
                          &lt;/configuration&gt;
              &lt;/plugin&gt;
     &lt;/plugins&gt;
  &lt;/build&gt;
  
  
  &lt;/project&gt;
  </code></pre>
  
  <p>I've also seen other posts in this forum but they do not adapt to my exact situation or they do not work. Thanks.</p>