Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added an sbt hello world project that tests sbt deployment and depend…

…ency.
  • Loading branch information...
commit 8402ec17d74de50dd035e86e0d3b5eb162e3a609 1 parent 86d8097
@nbronson nbronson authored
View
7 .gitignore
@@ -1,8 +1,13 @@
*.iws
+.*.swp
.idea/workspace.xml
-system.properties
out/
target/
lib_managed/
src_managed/
project/boot/
+dep_tests/sbt/out/
+dep_tests/sbt/target/
+dep_tests/sbt/lib_managed/
+dep_tests/sbt/src_managed/
+dep_tests/sbt/project/boot/
View
46 BUILDING.txt
@@ -1,39 +1,15 @@
-SOURCE
+BUILDING FROM SOURCE
-scala-stm is built using sbt, from http://code.google.com/p/simple-build-tool/
-sbt will download the correct version of scala and ScalaTest with
+scala-stm is built using sbt: http://code.google.com/p/simple-build-tool/
+Once you've installed sbt you can download scala-stm's compile dependency
+(ScalaTest), build, and run the unit tests with
- sbt update
+ sbt update test
-At this point, you should be able to compile and run the tests with
+You can get a list of sbt build targets with "sbt actions". If you
+compile, generate documentation or build a JAR, look in target/scala_* for
+the results. The Scala version is configured in project/build.properties.
+The left-most value for "build.scala.versions" is the default. To run
+a build target for all of the versions prefix the action with a "+",
+for example "sbt +test".
- sbt test
-
-
-DOCS
-
-The project's website is currently hosted using GitHub pages. This means
-that instead of being a subdirectory in the master branch of git, it is
-at the top level of a branch named gh-pages. Github automatically runs
-the entire contents of the gh-pages branch through the jekyll markup tool,
-and then places the resulting site at username.github.com/scala-stm-api.
-
-If you want to test out changes to the website locally or statically
-generate the site or a PDF, install jekyll using RubyGems (see
-https://github.com/mojombo/jekyll/wiki/install). In the root of the
-gh-pages, run jekyll --server --auto, and the website will be available
-on localhost:4000, with edits immediately available.
-
-The api subdirectory of the gh-pages branch is currently manually
-synchronized with the target/scala_2.8.1/doc/main/api that results from
-"sbt doc" on the master branch.
-
-PDF construction of the docs is not yet good quality, but the best results so
-far have resulted from (in a populated _site subdirectory):
-
- wkhtmltopdf -B 1in -L 1in -R 1.25in -T 1in --footer-right '[page]' \
- -s Letter --user-style-sheet css/print_like.css toc \
- --toc-header-text 'Table of Contents' \
- `grep "li..a.href='[a-z_.]*'" just_links.html | sed -e "s/^[^']*'//" -e
-"s/'.*//"` \
- output.pdf
View
18 dep_tests/PUBLISHING.txt
@@ -0,0 +1,18 @@
+DEPLOYING THE SCALA-STM ARTIFACT
+
+With a proper credentials file publishing a snapshot or release artifact is
+accomplished with
+
+ sbt +test
+ sbt +publish
+
+TESTING DEPLOYMENT AND ARTIFACT USAGE
+
+To test using published artifacts via sbt, select the desired scala-stm
+artifact in dep_tests/sbt/project/build/DepTestsSBTProject.scala .
+Make sure to disable the scala-tools snapshot repo when testing release
+builds. Then
+
+ cd dep_tests/sbt
+ sbt +update +run
+
View
0  dep_tests/sbt/RUN_SBT_HERE_TO_TEST_DEPS
No changes.
View
9 dep_tests/sbt/project/build.properties
@@ -0,0 +1,9 @@
+#Project properties
+#Sun Dec 05 13:12:02 PST 2010
+project.organization=org.scala-tools
+project.name=scala-stm-dep-tests-sbt
+sbt.version=0.7.4
+project.version=0.1
+def.scala.version=2.7.7
+build.scala.versions=2.8.1 2.8.0
+project.initialize=false
View
8 dep_tests/sbt/project/build/DepTestsSBTProject.scala
@@ -0,0 +1,8 @@
+import sbt._
+
+class DepTestsSBTProject(info: ProjectInfo) extends DefaultProject(info) {
+ val scala_tools_snapshots = "Scala-Tools Maven2 Repository - snapshots" at "http://scala-tools.org/repo-snapshots"
+ val scala_stm = "org.scala-tools" %% "scala-stm" % "0.1-SNAPSHOT"
+
+ // val scala_stm = "org.scala-tools" %% "scala-stm" % "0.1"
+}
View
8 dep_tests/sbt/src/main/scala/HelloWorld.scala
@@ -0,0 +1,8 @@
+import scala.concurrent.stm._
+
+object HelloWorld {
+ def main(args: Array[String]) {
+ val x = Ref("hello world!")
+ println(x.single())
+ }
+}
Please sign in to comment.
Something went wrong with that request. Please try again.