title: Exclude Dependency while package War file
body: <p>I am using the spring boot application and would like to exclude some dependencies while generating package. These package should not be included in generated war file:</p>
  <pre><code>&lt;dependency&gt;
              &lt;groupId&gt;com.mangofactory&lt;/groupId&gt;
              &lt;artifactId&gt;swagger-springmvc&lt;/artifactId&gt;
              &lt;version&gt;0.8.8&lt;/version&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
              &lt;optional&gt;true&lt;/optional&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springdoc&lt;/groupId&gt;
              &lt;artifactId&gt;springdoc-openapi-ui&lt;/artifactId&gt;
              &lt;version&gt;1.4.3&lt;/version&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
              &lt;optional&gt;true&lt;/optional&gt;
          &lt;/dependency&gt;
  </code></pre>