title: Unable to build Scala Maven project
body: <p>I am trying to build a maven-scala project. After creating the project, I created "clean compile" to build the project. When I run the build option, I see the below exception message:</p>
  
  <pre><code>"C:\Program Files\Java\jdk1.8.0_151\bin\java.exe" -Dmaven.multiModuleProjectDirectory=C:\ABCSparkWorkSpace\DataExpo "-Dmaven.home=C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2018.1.4\plugins\maven\lib\maven3" "-Dclassworlds.conf=C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2018.1.4\plugins\maven\lib\maven3\bin\m2.conf" "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2018.1.4\lib\idea_rt.jar=54199:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2018.1.4\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2018.1.4\plugins\maven\lib\maven3\boot\plexus-classworlds-2.5.2.jar" org.codehaus.classworlds.Launcher -Didea.version=2018.1.4 clean compile
  
  [WARNING] 
  [WARNING] Some problems were encountered while building the effective model for com.dbloads.programs:DataExpo:jar:1.0-SNAPSHOT
  [WARNING] 'build.plugins.plugin.version' for org.scala-tools:maven-scala-plugin is missing. @ line 51, column 15
  [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-eclipse-plugin is missing. @ line 69, column 15
  [WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
  [WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
  [INFO]                                                                         
  [INFO] ------------------------------------------------------------------------
  [INFO] Building DataExpo 1.0-SNAPSHOT
  [INFO] ------------------------------------------------------------------------
  [INFO] 
  [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ DataExpo ---
  [INFO] Deleting C:\ABCSparkWorkSpace\DataExpo\target
  [INFO] 
  [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ DataExpo ---
  [WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
  [INFO] skip non existing resourceDirectory C:\ABCSparkWorkSpace\DataExpo\src\main\resources
  [INFO] 
  [INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ DataExpo ---
  [INFO] Nothing to compile - all classes are up to date
  [INFO] 
  [INFO] --- maven-scala-plugin:2.15.2:compile (default) @ DataExpo ---
  [INFO] Checking for multiple versions of scala
  [INFO] includes = [**/*.scala,]
  [INFO] excludes = []
  [INFO] C:\ABCSparkWorkSpace\DataExpo\src\main\scala:-1: info: compiling
  [INFO] Compiling 1 source files to C:\ABCSparkWorkSpace\DataExpo\target\classes at 1528970864912
  [ERROR] error: error while loading Consumer, class file 'C:\Program Files\Java\jdk1.8.0_151\jre\lib\rt.jar(java/util/function/Consumer.class)' is broken
  [INFO] (bad constant pool tag 15 at byte 1073)
  [ERROR] one error found
  [INFO] ------------------------------------------------------------------------
  [INFO] BUILD FAILURE
  [INFO] ------------------------------------------------------------------------
  [INFO] Total time: 5.956 s
  [INFO] Finished at: 2018-06-14T15:37:47+05:30
  [INFO] Final Memory: 12M/220M
  [INFO] ------------------------------------------------------------------------
  [ERROR] Failed to execute goal org.scala-tools:maven-scala-plugin:2.15.2:compile (default) on project DataExpo: wrap: org.apache.commons.exec.ExecuteException: Process exited with an error: 1(Exit value: 1) -&gt; [Help 1]
  [ERROR] 
  [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
  [ERROR] Re-run Maven using the -X switch to enable full debug logging.
  [ERROR] 
  [ERROR] For more information about the errors and possible solutions, please read the following articles:
  [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
  
  Process finished with exit code 1
  </code></pre>
  
  <p>I downloaded the scala plugin from online on IntelliJ. My Java version is: "1.8.0_151". Below are the contents of 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;com.dbloads.programs&lt;/groupId&gt;
    &lt;artifactId&gt;DataExpo&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;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;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;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>Could anyone let me know what is the problem here and how can I fix it ?</p>