title: How can I compile only necessary widgets in Vaadin 7 with Maven?
body: <p>I am new to the Vaadin framework which I looks very interesting, using eclipse and maven to develop and build my application I find pretty annoying that every time I do a mvn clean install it will take so long time to build the app, I found that this is because it compiles the whole set of widgets.</p>
  
  <p>Even if I am only using a Button in my layout it will take so much on building the app.</p>
  
  <p>I have researched for some time in the Internet and 2 books but cannot find enough information about how to make it to only compile components that I am using and not the whole set.</p>
  
  <p>I created the project by using the maven archetype:</p>
  
  <pre><code>mvn archetype:generate -DarchetypeGroupId=com.vaadin -DarchetypeArtifactId=vaadin-archetype-application -DarchetypeVersion=7.1.9
  </code></pre>
  
  <p>I am sure that the widgetset is being compiled every time I build the war, when I do a mvn clean it removes the directory: /src/main/webapp/VAADIN/widgetsets and /src/main/webapp/VAADIN/gwt-unitCache</p>
  
  <p>When I run mvn install the build will last for more than 3 minutes:</p>
  
  <pre><code>...
  [INFO]    Compiling 6 permutations
  [INFO]       Compiling permutation 0...
  [INFO]       Process output
  [INFO]          Compiling
  [INFO]             Compiling permutation 1...
  [INFO]       Process output
  [INFO]          Compiling
  [INFO]             Compiling permutation 3...
  [INFO]       Process output
  [INFO]          Compiling
  [INFO]             Compiling permutation 2...
  [INFO]       Compiling permutation 4...
  [INFO]          Compiling
  [INFO]             Compiling permutation 5...
  [INFO]    Compile of permutations succeeded
  [INFO] Linking into /.../example/src/main/webapp/VAADIN/widgetsets/com.my.example.AppWidgetSet; Writing extras to /.../example/target/extra/com.my.example.AppWidgetSet
  [INFO]    Link succeeded
  [INFO]    Compilation succeeded -- 167.103s
  [INFO] 
  [INFO] --- maven-war-plugin:2.2:war (default-war) @ ade ---
  [INFO] Packaging webapp
  [INFO] Assembling webapp [example] in [/.../example/target/example-0.1.0-SNAPSHOT]
  [INFO] Processing war project
  [INFO] Copying webapp resources [/.../example/src/main/webapp]
  [INFO] Webapp assembled in [562 msecs]
  [INFO] Building war: /.../example/target/example-0.1.0-SNAPSHOT.war
  [INFO] 
  [INFO] --- maven-install-plugin:2.4:install (default-install) @ ade ---
  [INFO] Installing /.../example/target/example-0.1.0-SNAPSHOT.war to /.../example/0.1.0-SNAPSHOT/example-0.1.0-SNAPSHOT.war
  [INFO] Installing /.../example/pom.xml to /.../example/0.1.0-SNAPSHOT/example-0.1.0-SNAPSHOT.pom
  [INFO] ------------------------------------------------------------------------
  [INFO] BUILD SUCCESS
  [INFO] ------------------------------------------------------------------------
  [INFO] Total time: 3:03.768s
  [INFO] Finished at: Fri Jan 10 00:10:45 EST 2014
  [INFO] Final Memory: 16M/81M
  [INFO] ------------------------------------------------------------------------
  </code></pre>
  
  <p>After this the directory /src/main/webapp/VAADIN/widgetsets is generated again containing the following directories:</p>
  
  <pre><code>WEB-INF             
  com.my.example.AppWidgetSet
  </code></pre>
  
  <p>It also generates /src/main/webapp/VAADIN/gwt-unitCache</p>