Test for inline Ivy module configurations

git-svn-id: https://simple-build-tool.googlecode.com/svn/trunk@1048 d89573ee-9141-11dd-94d4-bdf5e562f29c
This commit is contained in:
dmharrah 2009-09-25 13:11:54 +00:00
parent 958310a105
commit feb7c0dc10
6 changed files with 83 additions and 0 deletions

View File

@ -0,0 +1,14 @@
import sbt._
class Test(info: ProjectInfo) extends DefaultProject(info)
{
def ivyCacheDirectory = outputPath / "ivy-cache"
override def updateOptions = CacheDirectory(ivyCacheDirectory) :: super.updateOptions.toList
def snapshotPattern = "http://scala-tools.org/repo-snapshots/[organization]/[module]/2.8.0-SNAPSHOT/[artifact]-[revision].[ext]"
def scalaSnapshots = Resolver.url("Scala Tools Snapshots") artifacts(snapshotPattern) ivys(snapshotPattern) mavenStyle()
val scOnly = ModuleConfiguration("org.not-scala-lang", "*", "2.8.0-.*", scalaSnapshots)
val uniqueScala = "org.scala-lang" % "scala-compiler" % "2.8.0-20090910.003346-219"
val otherDep = "org.scala-tools.sxr" % "sxr_2.7.5" % "0.2.3"
}

View File

@ -0,0 +1,14 @@
import sbt._
class Test(info: ProjectInfo) extends DefaultProject(info)
{
def ivyCacheDirectory = outputPath / "ivy-cache"
override def updateOptions = CacheDirectory(ivyCacheDirectory) :: super.updateOptions.toList
def snapshotPattern = "http://scala-tools.org/repo-snapshots/[organization]/[module]/2.8.a-SNAPSHOT/[artifact]-[revision].[ext]"
def scalaSnapshots = Resolver.url("Scala Tools Snapshots") artifacts(snapshotPattern) ivys(snapshotPattern) mavenStyle()
val scOnly = ModuleConfiguration("org.scala-lang", "*", "2.8.0-.*", scalaSnapshots)
val uniqueScala = "org.scala-lang" % "scala-compiler" % "2.8.0-20090910.003346-219"
val otherDep = "org.scala-tools.sxr" % "sxr_2.7.5" % "0.2.3"
}

View File

@ -0,0 +1,14 @@
import sbt._
class Test(info: ProjectInfo) extends DefaultProject(info)
{
def ivyCacheDirectory = outputPath / "ivy-cache"
override def updateOptions = CacheDirectory(ivyCacheDirectory) :: super.updateOptions.toList
def snapshotPattern = "http://scala-tools.org/repo-snapshots/[organization]/[module]/2.8.0-SNAPSHOT/[artifact]-[revision].[ext]"
def scalaSnapshots = Resolver.url("Scala Tools Snapshots") artifacts(snapshotPattern) ivys(snapshotPattern) mavenStyle()
val scOnly = ModuleConfiguration("org.scala-lang", "*", "2.8.0-.*", scalaSnapshots)
val uniqueScala = "org.scala-lang" % "scala-compiler" % "2.8.0-20090910.003346-218"
val otherDep = "org.scala-tools.sxr" % "sxr_2.7.5" % "0.2.3"
}

View File

@ -0,0 +1,2 @@
project.name=Test Module Configurations
project.version=1.0

View File

@ -0,0 +1,14 @@
import sbt._
class Test(info: ProjectInfo) extends DefaultProject(info)
{
def ivyCacheDirectory = outputPath / "ivy-cache"
override def updateOptions = CacheDirectory(ivyCacheDirectory) :: super.updateOptions.toList
def snapshotPattern = "http://scala-tools.org/repo-snapshots/[organization]/[module]/2.8.0-SNAPSHOT/[artifact]-[revision].[ext]"
def scalaSnapshots = Resolver.url("Scala Tools Snapshots") artifacts(snapshotPattern) ivys(snapshotPattern) mavenStyle()
val scOnly = ModuleConfiguration("org.scala-lang", "*", "2.8.0-.*", scalaSnapshots)
val uniqueScala = "org.scala-lang" % "scala-compiler" % "2.8.0-20090910.003346-219"
val otherDep = "org.scala-tools.sxr" % "sxr_2.7.5" % "0.2.3"
}

View File

@ -0,0 +1,25 @@
> update
[success]
> clean
[success]
$ copy-file changes/WrongOrg.scala project/build/Test.scala
[success]
$ reload
[success]
> update
[failure]
$ copy-file changes/WrongVersion.scala project/build/Test.scala
[success]
$ reload
[success]
> update
[failure]
$ copy-file changes/WrongPattern.scala project/build/Test.scala
[success]
$ reload
[success]
> update
[failure]