title: Need a gradle jar task that copies classes normally and custom files
body: <p>In my Gradle build, after the classes are compiled, I need to create a jar containing the classes in the typical location, but I also need the jar to include a set of other plain text files from a specific subdirectory of the project, and going into a different named folder in the jar.</p>
  
  <p>So, for instance, at the root of the jar, I'll have the "com" folder that starts the classes tree, but I'll also have a "META-INF" folder which contains a custom subfolder name, containing the files copied from the project.</p>
  
  <p><strong>Update</strong>:</p>
  
  <p>I tried adding the following:</p>
  
  <pre><code>jar {
      from ("src/main/resources/yang") {
          into ("META-INF/yang")
      } 
  }
  </code></pre>
  
  <p>This comes close to working properly.  It does copy all the files from that "from" folder" to the "into" folder in the resulting jar.  However, the resulting jar ALSO has a "yang" folder containing the same files from "src/main/resources/yang".  So, how do I prevent the default copying of that folder?</p>
  
  <p>I might end up doing this as part of a custom plugin, but for now I'd like to see if I can configure a simple "jar" task to do this.</p>
  
  <p><strong>Update</strong>:</p>
  
  <p>Based on the solution, the following worked:</p>
  
  <pre><code>jar {
      exclude "yang"
      from ("src/main/resources/yang") {
          into ("META-INF/yang")
      } 
  }
  </code></pre>