aboutsummaryrefslogtreecommitdiff
path: root/stage2/Lib.scala
diff options
context:
space:
mode:
authorChristopher Vogt <oss.nsp@cvogt.org>2016-06-08 22:29:29 -0400
committerChristopher Vogt <oss.nsp@cvogt.org>2016-06-08 22:37:39 -0400
commitb103b922f8671e7f45cef0cbd876ebe26cb0a2fa (patch)
treef5ed98ca10fbd55b73b1c743c6faa6ccda8f664d /stage2/Lib.scala
parentbf534fc64e54af905402833cace7687d73ba8817 (diff)
downloadcbt-b103b922f8671e7f45cef0cbd876ebe26cb0a2fa.tar.gz
cbt-b103b922f8671e7f45cef0cbd876ebe26cb0a2fa.tar.bz2
cbt-b103b922f8671e7f45cef0cbd876ebe26cb0a2fa.zip
Always create directory before trying to write file
Diffstat (limited to 'stage2/Lib.scala')
-rw-r--r--stage2/Lib.scala4
1 files changed, 2 insertions, 2 deletions
diff --git a/stage2/Lib.scala b/stage2/Lib.scala
index ac7b45c..b76402a 100644
--- a/stage2/Lib.scala
+++ b/stage2/Lib.scala
@@ -241,6 +241,7 @@ final class Lib(logger: Logger) extends Stage1Lib(logger) with Scaffold{
if( files.isEmpty ){
None
} else {
+ jarFile.getParentFile.mkdirs
logger.lib("Start packaging "++jarFile.string)
val manifest = new Manifest
manifest.getMainAttributes().put(Attributes.Name.MANIFEST_VERSION, "1.0")
@@ -360,8 +361,7 @@ final class Lib(logger: Logger) extends Stage1Lib(logger) with Scaffold{
// FIXME: do not build this file name including scalaMajorVersion in multiple places
val path = jarTarget.toString ++ ( "/" ++ artifactId++ "_" ++ scalaMajorVersion ++ "-" ++ version ++ ".pom" )
val file = new File(path)
- Files.write(file.toPath, ("<?xml version='1.0' encoding='UTF-8'?>\n" ++ xml.toString).getBytes)
- file
+ write(file, "<?xml version='1.0' encoding='UTF-8'?>\n" ++ xml.toString)
}
def concurrently[T,R]( concurrencyEnabled: Boolean )( items: Seq[T] )( projection: T => R ): Seq[R] = {