diff options
author | Jan Christopher Vogt <oss.nsp@cvogt.org> | 2016-06-09 01:32:07 -0400 |
---|---|---|
committer | Jan Christopher Vogt <oss.nsp@cvogt.org> | 2016-06-09 01:32:07 -0400 |
commit | b69826c7bc44573f01366ef472a59def6e4f1fc5 (patch) | |
tree | ed5fe21c4e5350b47d1dcc22e6007577dd13191e /stage2/Lib.scala | |
parent | bf534fc64e54af905402833cace7687d73ba8817 (diff) | |
parent | f56a035e5df98bc4e2bf90a1be5a7317be7ef667 (diff) | |
download | cbt-b69826c7bc44573f01366ef472a59def6e4f1fc5.tar.gz cbt-b69826c7bc44573f01366ef472a59def6e4f1fc5.tar.bz2 cbt-b69826c7bc44573f01366ef472a59def6e4f1fc5.zip |
Merge pull request #142 from cvogt/fix-mkdir
Always create directory before trying to write file
Diffstat (limited to 'stage2/Lib.scala')
-rw-r--r-- | stage2/Lib.scala | 4 |
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] = { |