rules_jvm_external icon indicating copy to clipboard operation
rules_jvm_external copied to clipboard

MergeJars doesn't handle LICENSE directory correctly

Open chris-bannister-privitar opened this issue 3 years ago • 0 comments

When using java_export it fails to run MergeJars with

Exception in thread "main" java.nio.file.FileSystemException: /var/folders/gm/ld3w53xd25v2pjcllsv6wtqh0000gn/T/mergejars10731205331298143417/LICENSE: Is a directory
	at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:100)
	at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
	at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:116)
	at java.base/sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:219)
	at java.base/java.nio.file.spi.FileSystemProvider.newOutputStream(FileSystemProvider.java:478)
	at java.base/java.nio.file.Files.newOutputStream(Files.java:219)
	at rules.jvm.external.jar.DuplicateEntryStrategy$1.resolve(DuplicateEntryStrategy.java:22)
	at rules.jvm.external.jar.MergeJars.main(MergeJars.java:159)

This is coming from a jar which is fetched via http_jar so doesn't have maven_coordinates and is in the deps of the java_export