title: How can I import external themes with Vaadin and use them with annotations?
body: <p>Let's say I have two projects.  <code>CompanyApp</code> and <code>CompanyVaadinThemes</code>.</p>
  
  <p>CompanyApp is a normal Vaadin 7.7.3 app.  CompanyVaadinThemesis just a Vaadin 7.7.3 theme compiled into a jar.</p>
  
  <p><strong>CompanyVaadinThemes.jar</strong></p>
  
  <pre><code>source/main/resources/VAADIN/themes/mytheme
      mytheme.scss
      styles.scss
      ...
  </code></pre>
  
  <p><strong>CompanyApp.war</strong></p>
  
  <pre><code>pom.xml
      ...
      &lt;dependency&gt;
          &lt;groupId&gt;com.vaadin&lt;/groupId&gt;
          &lt;artifactId&gt;vaadin-themes&lt;/artifactId&gt;
          &lt;version&gt;${vaadin.version}&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.company&lt;/groupId&gt;
          &lt;artifactId&gt;company-vaadin-themes&lt;/artifactId&gt;
          &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
      &lt;/dependency&gt;
  
  
  ...
  
  UI.java
  
      @SpringUI
      @Theme("mytheme")
      public class CompanyUI extends UI {
  </code></pre>
  
  <p>However, I can't seem to figure out how to make this work.  If I copy the actual code from the CompanyVaadinThemes.jar into the main CompanyApp, all is fine.  I can use "mytheme", "valo", etc.  </p>
  
  <p>But I want to keep the actual theme in a separate project so that future projects can just simply add it as a dependency.</p>
  
  <p>Here is the pom to CompanyVaadinThemes:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &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;com.company&lt;/groupId&gt;
      &lt;artifactId&gt;company-vaadin-themes&lt;/artifactId&gt;
      &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
      &lt;packaging&gt;jar&lt;/packaging&gt;
  
      &lt;properties&gt;
          &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
          &lt;java.version&gt;1.8&lt;/java.version&gt;
          &lt;vaadin.version&gt;7.7.3&lt;/vaadin.version&gt;
          &lt;vaadin.theme&gt;mytheme&lt;/vaadin.theme&gt;
          &lt;vaadin.plugin.version&gt;${vaadin.version}&lt;/vaadin.plugin.version&gt;
      &lt;/properties&gt;
  
      &lt;repositories&gt;
          &lt;repository&gt;
              &lt;id&gt;vaadin-addons&lt;/id&gt;
              &lt;url&gt;http://maven.vaadin.com/vaadin-addons&lt;/url&gt;
          &lt;/repository&gt;
          &lt;repository&gt;
              &lt;id&gt;com-vaadin-prereleases&lt;/id&gt;
              &lt;url&gt;https://maven.vaadin.com/vaadin-prereleases&lt;/url&gt;
          &lt;/repository&gt;
      &lt;/repositories&gt;
  
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.vaadin&lt;/groupId&gt;
              &lt;artifactId&gt;vaadin-server&lt;/artifactId&gt;
              &lt;version&gt;${vaadin.version}&lt;/version&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.vaadin&lt;/groupId&gt;
              &lt;artifactId&gt;vaadin-themes&lt;/artifactId&gt;
              &lt;version&gt;${vaadin.version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;javax.servlet&lt;/groupId&gt;
              &lt;artifactId&gt;javax.servlet-api&lt;/artifactId&gt;
              &lt;version&gt;3.0.1&lt;/version&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
  
      &lt;build&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
                  &lt;version&gt;3.2&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;source&gt;${java.version}&lt;/source&gt;
                      &lt;target&gt;${java.version}&lt;/target&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;com.vaadin&lt;/groupId&gt;
                  &lt;artifactId&gt;vaadin-maven-plugin&lt;/artifactId&gt;
                  &lt;version&gt;${vaadin.version}&lt;/version&gt;
              &lt;/plugin&gt;
  
          &lt;/plugins&gt;
      &lt;/build&gt;
  &lt;/project&gt;
  </code></pre>