title: Spring-Boot and scala cannot find main class
body: <p>I am trying to make a simple hello world web application in Scala which bootstraps spring-boot as its framework using maven as build tool.</p>
  
  <p>I looked around a bit (there are a few tutorials with Gradle and much less information with maven, is there a reason for it?)</p>
  
  <p>I Managed to get everything wired up but now i am stuck with this error when trying to run the application:</p>
  
  <pre><code>Error: Could not find or load main class SampleWebApplication
  </code></pre>
  
  <p>Here is the source code, </p>
  
  <p><a href="https://github.com/jleskovar/spring-boot-scala-app-parent/blob/master/pom.xml" rel="nofollow">parent pom from github</a> removing some code about git and deployment leaving the structure intact</p>
  
  <p>Then my web application pom:</p>
  
  <blockquote>
  <pre><code>&lt;parent&gt;
      &lt;groupId&gt;X.Y.Z&lt;/groupId&gt;
      &lt;artifactId&gt;spring-boot-scala-app-parent&lt;/artifactId&gt;
      &lt;version&gt;1.0.5-SNAPSHOT&lt;/version&gt;
  &lt;/parent&gt;
  &lt;artifactId&gt;webservice&lt;/artifactId&gt;
  &lt;dependencies&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-web&lt;/artifactId&gt;
      &lt;/dependency&gt;
  &lt;/dependencies&gt;
  &lt;build&gt;
  &lt;plugins&gt;
  &lt;plugin&gt;
      &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
      &lt;artifactId&gt;spring-boot-maven-plugin&lt;/artifactId&gt;
      &lt;version&gt;1.1.3.RELEASE&lt;/version&gt;
      &lt;configuration&gt;
          &lt;mainClass&gt;SampleWebApplication&lt;/mainClass&gt;
      &lt;/configuration&gt;
      &lt;executions&gt;
          &lt;execution&gt;
              &lt;goals&gt;
                  &lt;goal&gt;repackage&lt;/goal&gt;
              &lt;/goals&gt;
          &lt;/execution&gt;
      &lt;/executions&gt;
  &lt;/plugin&gt;
  &lt;/plugins&gt;
  </code></pre>
    
    <p></p>
  </blockquote>
  
  <p>SampleWebApplication:</p>
  
  <blockquote>
  <pre><code>import org.springframework.boot.SpringApplication
  class SampleWebApplication extends App {
    SpringApplication.run(classOf[SampleConfig]);
  }
  </code></pre>
  </blockquote>
  
  <p>SampleConfig:</p>
  
  <blockquote>
  <pre><code>@Configuration
  @EnableAutoConfiguration
  @ComponentScan
  class SampleConfig {
  }
  </code></pre>
  </blockquote>