summaryrefslogtreecommitdiff
path: root/src/compiler
diff options
context:
space:
mode:
authorLex Spoon <lex@lexspoon.org>2006-03-07 11:28:23 +0000
committerLex Spoon <lex@lexspoon.org>2006-03-07 11:28:23 +0000
commit9c599f5f907df488a6d7101aa5a707ee50d88a07 (patch)
tree23743323157a433389be66a4725d2cf15ec6b79a /src/compiler
parent3cc6245389bea0646c07b8a4f76047d492b386f7 (diff)
downloadscala-9c599f5f907df488a6d7101aa5a707ee50d88a07.tar.gz
scala-9c599f5f907df488a6d7101aa5a707ee50d88a07.tar.bz2
scala-9c599f5f907df488a6d7101aa5a707ee50d88a07.zip
allow specifying the link of the generated adve...
allow specifying the link of the generated advertisement file
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/scala/tools/ant/ScalaBazaar.scala24
1 files changed, 20 insertions, 4 deletions
diff --git a/src/compiler/scala/tools/ant/ScalaBazaar.scala b/src/compiler/scala/tools/ant/ScalaBazaar.scala
index 909ace3135..2406b69237 100644
--- a/src/compiler/scala/tools/ant/ScalaBazaar.scala
+++ b/src/compiler/scala/tools/ant/ScalaBazaar.scala
@@ -6,6 +6,7 @@
** $Id: ScalaTool.scala 5482 2006-01-09 19:22:46 +0100 (Mon, 09 Jan 2006) dubochet $
\* */
+
package scala.tools.ant {
import scala.collection.Map
@@ -24,14 +25,18 @@ package scala.tools.ant {
SourceFileScanner}
import org.apache.tools.ant.types.{EnumeratedAttribute, Reference, FileSet}
- /** An Ant task that generates a SH or BAT script to execute a Scala program.
+ /** An Ant task that generates a Scala Bazaars package (sbp file) along
+ * with an advertisement of that package.
+ *
* This task can take the following parameters as attributes:<ul>
* <li>file (mandatory),</li>
* <li>adfile,</li>
* <li>name (mandatory),</li>
* <li>version (mandatory),</li>
* <li>depends,</li>
- * <li>description.</li></ul>
+ * <li>description,</li>
+ * <li>link.</li>
+ * </ul>
*
* @author Gilles Dubochet */
class ScalaBazaar extends Task {
@@ -55,7 +60,10 @@ package scala.tools.ant {
private var depends: List[String] = Nil
/** An (optional) description of this package. */
private var desc: Option[String] = None
- /** An (optional) description of this package. */
+ /** An (optional) URL link pointing to the location of the package */
+ private var link: Option[String] = None
+
+ /** The sets of files to include in the package */
private object fileSetsMap extends Map[String, List[FileSet]] {
private var content = new HashMap[String, List[FileSet]]()
def get(key: String): Option[List[FileSet]] = content.get(key)
@@ -107,6 +115,11 @@ package scala.tools.ant {
def setDesc(input: String) =
desc = Some(input)
+ /** Sets the link attribute of this package. Used by Ant.
+ * @param input The value of <code>link</code>. */
+ def setLink(input: String) =
+ link = Some(input)
+
def addConfiguredLibset(input: FileSet) =
fileSetsMap.update("lib", input)
@@ -226,7 +239,10 @@ package scala.tools.ant {
val advert = {
<availablePackage>
{pack}
- <link></link>
+ {link match {
+ case None => <link>INSERT LINK HERE</link>
+ case Some(str) => <link>{str}</link>
+ }}
</availablePackage>
};