summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGilles Dubochet <gilles.dubochet@epfl.ch>2006-03-08 21:25:29 +0000
committerGilles Dubochet <gilles.dubochet@epfl.ch>2006-03-08 21:25:29 +0000
commitd7919a1a9e179163e428e83863329f93231b08ff (patch)
tree679f761729427528d41a76395eacbc4e420646ce /src
parentb0c609cf01519bbf02aa762f758ab5047c578f81 (diff)
downloadscala-d7919a1a9e179163e428e83863329f93231b08ff.tar.gz
scala-d7919a1a9e179163e428e83863329f93231b08ff.tar.bz2
scala-d7919a1a9e179163e428e83863329f93231b08ff.zip
ScalaBazaar Ant task now correctly handles empt...
ScalaBazaar Ant task now correctly handles empty packages (placeholders).
Diffstat (limited to 'src')
-rw-r--r--src/compiler/scala/tools/ant/ScalaBazaar.scala32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/compiler/scala/tools/ant/ScalaBazaar.scala b/src/compiler/scala/tools/ant/ScalaBazaar.scala
index 2406b69237..b6dd04088b 100644
--- a/src/compiler/scala/tools/ant/ScalaBazaar.scala
+++ b/src/compiler/scala/tools/ant/ScalaBazaar.scala
@@ -235,6 +235,8 @@ package scala.tools.ant {
</package>
}
+ log("Creating package '" + name.get + "'")
+
// Creates the advert file
val advert = {
<availablePackage>
@@ -255,11 +257,10 @@ package scala.tools.ant {
for {
val Pair(folder, fileSets) <- fileSetsMap.fileSets
val fileSet <- fileSets
- val file <-
- List.fromArray(fileSet.getDirectoryScanner(getProject).getIncludedFiles)
- } yield {Console.println(file.toString); Triple(folder, fileSet.getDir(getProject), file)}
+ val file <- List.fromArray(fileSet.getDirectoryScanner(getProject).getIncludedFiles)
+ } yield Triple(folder, fileSet.getDir(getProject), file)
+ val zip = new ZipOutputStream(new FileOutputStream(file.get, false))
if (!zipContent.isEmpty) {
- val zip = new ZipOutputStream(new FileOutputStream(file.get, false))
for (val Triple(destFolder, srcFolder, file) <- zipContent) {
log(file, Project.MSG_DEBUG)
zip.putNextEntry(new ZipEntry(destFolder + "/" + file))
@@ -272,18 +273,17 @@ package scala.tools.ant {
zip.closeEntry()
input.close()
}
- zip.putNextEntry(new ZipEntry("meta/description"))
- val packInput = new StringReader(pack.toString())
- var byte = packInput.read()
- while (byte != -1) {
- zip.write (byte)
- byte = packInput.read()
- }
- zip.closeEntry()
- packInput.close()
- zip.close
- } else log("No files added to SBaz archive.", Project.MSG_VERBOSE)
-
+ } else log("Archive contains no files.", Project.MSG_VERBOSE)
+ zip.putNextEntry(new ZipEntry("meta/description"))
+ val packInput = new StringReader(pack.toString())
+ var byte = packInput.read()
+ while (byte != -1) {
+ zip.write (byte)
+ byte = packInput.read()
+ }
+ zip.closeEntry()
+ packInput.close()
+ zip.close
}
}