title: Spring Boot Migration Issue on Packaging JAR and WAR using Maven
body: <p>We are trying to migrate our existing Spring MVC applications to Spring Boot application. Our existing applications are using 3.2.9, so tons of XML configurations. All the beans are defined in the XML files. What we have done is first we have upgraded our existing applications to Spring 4.2.5 version since Spring Boot will work only with Spring 4 versions. </p>
  
  <p>Our requirement is to have both FAT JARs and WAR files from the build. Most of our existing customers would prefer Application Server deployment, so we have to create WAR file for them. Also for our internal testing and new deployments, we are planning to use FAT JARs. </p>
  
  <p>How can we achieve them in the Maven file, we are able to provide separately as below. Is there any maven plug-in to generate both in single build?</p>
  
  <pre><code>&lt;packaging&gt;jar&lt;/packaging&gt;
  </code></pre>
  
  <p>or</p>
  
  <pre><code>&lt;packaging&gt;war&lt;/packaging&gt;
  </code></pre>
  
  <p>We are publishing our artifacts into Nexus repository. So, we want to have the separate repository location for JAR files and WAR files. Can we do that using the single <code>pom.xml</code> file?</p>
  
  <p>Also another question, we have all the XML configurations under <code>WEB-INF</code> folder. When we are moving to the Spring Boot application, it has to be under the <code>resources</code> folder. How can we handle them easily. When we build FAT jars, the resources are not looked under <code>WEB-INF</code> because it simply ignores the <code>webapp</code> project.</p>
  
  <p>I am looking forward for some guidance to complete the migration. Infact, we have already done that changes and it is working fine, but we are confused on this WAR / JAR generations.  </p>
  
  <p><strong>Update:</strong>
  I have got another question in mind, if we are converting our existing applications to spring boot, do we still have to maintain WEB-INF folder in the web-app or can move everything to the resources folder?. While building the WAR file, whether spring boot takes care of moving the resources to WEB-INF? How spring boot would manage to create the WAR file if you are putting all the resources under the <code>resources</code> folder.</p>