title: Defining custom classpath for a jar manifest in gradle
body: <p>I'm trying to define a jar task for all sub projects (about 30). I tried the following task:</p>
  
  <pre><code> jar {
              destinationDir = file('../../../../_temp/core/modules')
              archiveName = baseName + '.' + extension
              metaInf {
                      from 'ejbModule/META-INF/' exclude 'MANIFEST.MF'
              }
  
            def manifestClasspath = configurations.runtime.collect { it.getName() }.join(',') 
              manifest {
              attributes("Manifest-Version"       : "1.0",
                  "Created-By"             : vendor,
                  "Specification-Title"    : appName,
                  "Specification-Version"  : version,
                  "Specification-Vendor"   : vendor,
                  "Implementation-Title"   : appName,
                  "Implementation-Version" : version,
                  "Implementation-Vendor"  : vendor,
                  "Main-Class"             : "com.dcx.epep.Start",
                  "Class-Path"             : manifestClasspath 
              )
              }
      }
  </code></pre>
  
  <p>My problem is, that the dependencies between the sub projects are not included in the manifest's classpath. I tried changing the runtime configuration to a compile configuration but that results in the following error.</p>
  
  <blockquote>
    <p><ul>
    <li>What went wrong: A problem occurred evaluating project ':EskoordClient'.</p>
    
    <blockquote>
      <p>You can't change a configuration which is not in unresolved state!</li>
      </ul></p>
    </blockquote>
  </blockquote>
  
  <p>That is my complete build file for project EskoordClient:</p>
  
  <pre><code>dependencies {     
      compile project(':ePEPClient')
  }
  </code></pre>
  
  <p>Most of my sub projects build files only define the projects dependencies. 3rd party lib dependencies are defined in the build file of the super project.</p>
  
  <p>Is there a possibility to include all needed classpath entries (3rd party libraries and other projects) to a manifest classpath in a superproject for all subprojects.</p>