apache / daffodil-sbt

Apache Daffodil SBT Plugin
https://daffodil.apache.org/
Apache License 2.0
1 stars 3 forks source link

Main schema found in jar leads to java.lang.IllegalArgumentException: URI is not hierarchical #3

Closed stevedlawrence closed 4 months ago

stevedlawrence commented 9 months ago

If the resource path in daffodilPackageBinInfos resolves to a schema in a jar on the classpath (for example, if the root schema comes from a dependency or because exportJars := true), then sbt packageDaffodilBin fails with the error:

[error] Exception in thread "main" java.lang.IllegalArgumentException: URI is not hierarchical
[error]     at java.io.File.<init>(File.java:420)

This is probably because we pass the result of getRequireResource to the File constructor, which compileFile expects. But the resources is a jar URI and so does not work. Hopefully we can just switch to compileSource which accepts a URI.