title: gradle spring boot project: How to rename files in war?
body: <p>I am building a web application using Spring Boot.
  I would like to change some names of WEB-INF/lib/*.jars in the final.</p>
  
  <p>If I understand the docs correctly, this should work using the "rename" method of the bootWar task (a subclass of the standard war task) which is supplied by the spring-boot-gradle-plugin.</p>
  
  <p>However the "rename" method is never executed at all, i.e. if I add this to my build.gradle:</p>
  
  <pre><code>   bootWar {
        rename { name -&gt;
          println "***** " + name
          name
      }
  </code></pre>
  
  <p>then nothing gets printed at all. The "rename" method overloads that take an original pattern and a replacement pattern do not work either.</p>
  
  <p>I tried it with an example project, and it did not work there either:</p>
  
  <ul>
  <li>use Spring Initializr with "Web" dependency to create a new project</li>
  <li>change the <code>apply plugin: 'java'</code> to <code>apply plugin: 'war'</code></li>
  <li>add the <code>bootWar</code> configuration from above</li>
  </ul>