title: Gradle-Build: Cannot convert the provided notation to a File or URI
body: <p>When building with Gradle in IntelliJ with the follwoing gradle.build file:</p>
  
  <pre><code>version '1.0-SNAPSHOT'
  apply plugin: 'java'
  apply plugin: 'idea'
  
  sourceCompatibility = 1.8
  repositories {
      mavenCentral()
  }
  
  dependencies {
  
      // https://mvnrepository.com/artifact/org.jdom/jdom
      compile (
              [group: 'org.jdom', name: 'jdom', version: '2.0.0'],
              [group: 'org.controlsfx', name: 'controlsfx', version: '8.40.14'],
              [group: 'net.java.openjfx.backport', name: 'openjfx-78-backport-compat', version: '1.8.0.1']
      )
      testCompile group: 'junit', name: 'junit', version: '4.12'
  }
  
  jar {
      manifest {
          from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
          attributes 'Main-Class': 'de.to.main.class.itv.Main'
      }
  }
  </code></pre>
  
  <p>I get the following error:</p>
  
  <pre><code>9:44:43 PM: Executing task 'build'...
  
  Note: Some input files use unchecked or unsafe operations.
  Note: Recompile with -Xlint:unchecked for details.
  :compileJava
  :processResources
  :classes
  :jar FAILED
  
  FAILURE: Build failed with an exception.
  
  * What went wrong:
  Could not copy MANIFEST.MF to 'C:\Users\pre name\Java\Uni\SWP\ITV\build\tmp\jar\MANIFEST.MF'.
  &gt; Cannot convert the provided notation to a File or URI: [ZIP 'D:\Development\.gradle\caches\modules-2\files-2.1\org.jdom\jdom\2.0.0\e03447aa5a53e7ee9f0ebb9da64c5c178900173d\jdom-2.0.0.jar', ZIP 'D:\Development\.gradle\caches\modules-2\files-2.1\org.controlsfx\controlsfx\8.40.14\7338f13794b82c77ea152803df56a15d376c3b0e\controlsfx-8.40.14.jar', ZIP 'D:\Development\.gradle\caches\modules-2\files-2.1\net.java.openjfx.backport\openjfx-78-backport-compat\1.8.0.1\7cb8f4c47f25736b099d0db2a0c518e909ed6e4d\openjfx-78-backport-compat-1.8.0.1.jar'].
    The following types/formats are supported:
      - A String or CharSequence path, for example 'src/main/java' or '/usr/include'.
      - A String or CharSequence URI, for example 'file:/usr/include'.
      - A File instance.
      - A Path instance.
      - A URI or URL instance.
  
  * Try:
  Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
  
  BUILD FAILED in 1s
  3 actionable tasks: 3 executed
  Cannot convert the provided notation to a File or URI: [ZIP 'D:\Development\.gradle\caches\modules-2\files-2.1\org.jdom\jdom\2.0.0\e03447aa5a53e7ee9f0ebb9da64c5c178900173d\jdom-2.0.0.jar', ZIP 'D:\Development\.gradle\caches\modules-2\files-2.1\org.controlsfx\controlsfx\8.40.14\7338f13794b82c77ea152803df56a15d376c3b0e\controlsfx-8.40.14.jar', ZIP 'D:\Development\.gradle\caches\modules-2\files-2.1\net.java.openjfx.backport\openjfx-78-backport-compat\1.8.0.1\7cb8f4c47f25736b099d0db2a0c518e909ed6e4d\openjfx-78-backport-compat-1.8.0.1.jar'].
  The following types/formats are supported:
    - A String or CharSequence path, for example 'src/main/java' or '/usr/include'.
    - A String or CharSequence URI, for example 'file:/usr/include'.
    - A File instance.
    - A Path instance.
    - A URI or URL instance.
  9:44:44 PM: Task execution finished 'build'.
  </code></pre>
  
  <p>I guessed it would be a whitspace error in the path, but after changing the service directory path to one without whitspaces, the error keeps to be the same.</p>
  
  <p>The goal is to build a jar of the project including the external dependencys.
  The question is, what is wrong with the provided annotation?</p>