When I assign a list of files to “metaInf” in a java build file the jar task is failing with “java.lang.IllegalArgumentException: Neither path nor baseDir may be null or empty string.” The project is a multi project build, where the root project produces no artifacts (maintains configuration). One subproject is a war project, and the other subproject a java project. The war project has a dependency on the java project, expressed as:
runtime project(path: ‘:javaproj’, configuration: ‘archives’) }
The java project build.gradle file contains only the following:
metaInf << new File(‘src/main/META-INF’).listFiles()
In the docs (http://gradle.org/docs/current/userguide/java_plugin.html) section 23.13.2. it gives the sample “metaInf << new FileSet(someDir)” which actually will not compile. Neither will using the “from()” method instead of FileSet, thus I had resorted to just using Java/Groovy above. After much pain I finally found a fix/work around/“the correct way” by replacing this line with:
The error message mentioned to report this error via the forums; should I/can I file this as an issue, or if it is determined that this behavior is correct, at least correct the documentation? I do have a simple example set up that reproduces the issue if desired.