title: How to surpass gradle wsimport task JDK 8 access restrictions?
body: <p>I have a wsimport task in my gradle build working fine until Java 7:</p>
  
  <pre><code>task wsimport {
      ext.destDir = file("${buildDir}/generated/java")
      ext.wsdlSrc = file("src/main/resources/schema/example/my.wsdl")
      ext.bindingSrc = file("src/main/resources/schema/example/bindings.xsd")
      outputs.dir destDir
      doLast {
          ant {
              destDir.mkdirs()
              taskdef(name: 'wsimport',
                  classname: 'com.sun.tools.ws.ant.WsImport',
                  classpath: configurations.jaxws.asPath)
              wsimport(keep: true,
                  package: 'net.example.my',
                  xnocompile: true,
                  quiet: true,
                  sourcedestdir: destDir,
                  wsdl: wsdlSrc,
                  binding: bindingSrc,
                  encoding: "UTF-8"
              )
          }
      }
  }
  </code></pre>
  
  <p>When switching to JDK 8 (build 1.8.0-b129) I get the following error:</p>
  
  <pre><code>java.lang.AssertionError: org.xml.sax.SAXParseException; systemId: ... schema_reference:
  Failed to read schema document 'xjc.xsd', because 'file' access is not allowed due to restriction set by the accessExternalSchema property.
  </code></pre>
  
  <p>Searching for the problem I found the following post (describing the problem also with Java 7 surprisingly): <a href="https://github.com/stianh/gradle-jaxb-plugin/issues/20">https://github.com/stianh/gradle-jaxb-plugin/issues/20</a>
  But I am unable to pass the environment/argument to wsimport/xjc.</p>
  
  <p>How to disable this access or the restriction?</p>