Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Modify the jar construction code to be standard

  • Loading branch information...
commit ab0a99dc190e12c789ca32148dd03ef315427d38 1 parent 1ed5790
jwills authored
View
7 scrunch/src/main/scala/org/apache/scrunch/interpreter/InterpreterRunner.scala
@@ -170,13 +170,18 @@ object InterpreterRunner extends MainGenericRunner {
dir.foreach { file =>
if (file.isDirectory) {
// Recursively descend into subdirectories, adjusting the package name as we do.
+ val dirPath = entryPath + file.name + "/"
+ val entry: JarEntry = new JarEntry(dirPath)
+ jarStream.putNextEntry(entry)
+ jarStream.closeEntry()
addVirtualDirectoryToJar(file.asInstanceOf[VirtualDirectory],
- entryPath + file.name + "/", jarStream)
+ dirPath, jarStream)
} else if (file.hasExtension("class")) {
// Add class files as an entry in the jar file and write the class to the jar.
val entry: JarEntry = new JarEntry(entryPath + file.name)
jarStream.putNextEntry(entry)
jarStream.write(file.toByteArray)
+ jarStream.closeEntry()
}
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.