title: maven-scala-plugin error running scala code in a Maven project in IntelliJ
body: <p>I'm trying to create my first "Hello World" Scala project using Maven as the build tool and IntelliJ as my IDE. I keep getting the following error when running <code>mvn package</code>.</p>
  
  <pre><code>Failed to execute goal org.scala-tools:maven-scala-plugin:2.15.2:compile
  </code></pre>
  
  <p>Here is the full error: 
  Failed to execute goal org.scala-tools:maven-scala-plugin:2.15.2:compile (default) on project couchbase-test-3: wrap: org.apache.commons.exec.ExecuteException: Process exited with an error: 1(Exit value: 1)</p>
  
  <p>Here is my pom.xml file.</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/maven-v4_0_0.xsd"&gt;
    &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
    &lt;groupId&gt;org.example&lt;/groupId&gt;
    &lt;artifactId&gt;couchbase-test-3&lt;/artifactId&gt;
    &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
    &lt;inceptionYear&gt;2008&lt;/inceptionYear&gt;
    &lt;properties&gt;
      &lt;scala.version&gt;2.7.0&lt;/scala.version&gt;
    &lt;/properties&gt;
  
    &lt;repositories&gt;
      &lt;repository&gt;
        &lt;id&gt;scala-tools.org&lt;/id&gt;
        &lt;name&gt;Scala-Tools Maven2 Repository&lt;/name&gt;
        &lt;url&gt;http://scala-tools.org/repo-releases&lt;/url&gt;
      &lt;/repository&gt;
    &lt;/repositories&gt;
  
    &lt;pluginRepositories&gt;
      &lt;pluginRepository&gt;
        &lt;id&gt;scala-tools.org&lt;/id&gt;
        &lt;name&gt;Scala-Tools Maven2 Repository&lt;/name&gt;
        &lt;url&gt;http://scala-tools.org/repo-releases&lt;/url&gt;
      &lt;/pluginRepository&gt;
    &lt;/pluginRepositories&gt;
  
    &lt;dependencies&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;org.scala-lang&lt;/groupId&gt;
        &lt;artifactId&gt;scala-library&lt;/artifactId&gt;
        &lt;version&gt;${scala.version}&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;junit&lt;/groupId&gt;
        &lt;artifactId&gt;junit&lt;/artifactId&gt;
        &lt;version&gt;4.4&lt;/version&gt;
        &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;org.specs&lt;/groupId&gt;
        &lt;artifactId&gt;specs&lt;/artifactId&gt;
        &lt;version&gt;1.2.5&lt;/version&gt;
        &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
    &lt;/dependencies&gt;
  
    &lt;build&gt;
      &lt;sourceDirectory&gt;src/main/scala&lt;/sourceDirectory&gt;
      &lt;testSourceDirectory&gt;src/test/scala&lt;/testSourceDirectory&gt;
      &lt;plugins&gt;
        &lt;plugin&gt;
          &lt;groupId&gt;org.scala-tools&lt;/groupId&gt;
          &lt;artifactId&gt;maven-scala-plugin&lt;/artifactId&gt;
          &lt;version&gt;2.15.2&lt;/version&gt;
          &lt;executions&gt;
            &lt;execution&gt;
              &lt;goals&gt;
                &lt;goal&gt;compile&lt;/goal&gt;
                &lt;goal&gt;testCompile&lt;/goal&gt;
              &lt;/goals&gt;
            &lt;/execution&gt;
          &lt;/executions&gt;
          &lt;configuration&gt;
            &lt;scalaVersion&gt;${scala.version}&lt;/scalaVersion&gt;
            &lt;args&gt;
              &lt;arg&gt;-target:jvm-1.5&lt;/arg&gt;
            &lt;/args&gt;
          &lt;/configuration&gt;
        &lt;/plugin&gt;
        &lt;plugin&gt;
          &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
          &lt;artifactId&gt;maven-eclipse-plugin&lt;/artifactId&gt;
          &lt;version&gt;2.9&lt;/version&gt;
          &lt;configuration&gt;
            &lt;downloadSources&gt;true&lt;/downloadSources&gt;
            &lt;buildcommands&gt;
              &lt;buildcommand&gt;ch.epfl.lamp.sdt.core.scalabuilder&lt;/buildcommand&gt;
            &lt;/buildcommands&gt;
            &lt;additionalProjectnatures&gt;
              &lt;projectnature&gt;ch.epfl.lamp.sdt.core.scalanature&lt;/projectnature&gt;
            &lt;/additionalProjectnatures&gt;
            &lt;classpathContainers&gt;
              &lt;classpathContainer&gt;org.eclipse.jdt.launching.JRE_CONTAINER&lt;/classpathContainer&gt;
              &lt;classpathContainer&gt;ch.epfl.lamp.sdt.launching.SCALA_CONTAINER&lt;/classpathContainer&gt;
            &lt;/classpathContainers&gt;
          &lt;/configuration&gt;
        &lt;/plugin&gt;
      &lt;/plugins&gt;
    &lt;/build&gt;
    &lt;reporting&gt;
      &lt;plugins&gt;
        &lt;plugin&gt;
          &lt;groupId&gt;org.scala-tools&lt;/groupId&gt;
          &lt;artifactId&gt;maven-scala-plugin&lt;/artifactId&gt;
          &lt;version&gt;2.15.2&lt;/version&gt;
          &lt;configuration&gt;
            &lt;scalaVersion&gt;${scala.version}&lt;/scalaVersion&gt;
          &lt;/configuration&gt;
        &lt;/plugin&gt;
      &lt;/plugins&gt;
    &lt;/reporting&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>The JDK I'm using is /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home. </p>
  
  <p>The code I'm trying to run is just to print out "Hello World!":</p>
  
  <pre><code>package org.example
  
  /**
   * Hello world!
   *
   */
  object App extends Application {
    println( "Hello World!" )
  }
  </code></pre>
  
  <p>Any ideas how to fix this? </p>