Permalink
Browse files

Fix Makefile for sbt. Add sbt-eclipse project plugin

  • Loading branch information...
1 parent 780ecf6 commit 0309baac62cc5354757ddcdf04707a3759a1d432 @xerial xerial committed Sep 10, 2013
Showing with 42 additions and 21 deletions.
  1. +27 −18 Makefile
  2. +13 −3 development.md
  3. +2 −0 project/plugins.sbt
View
@@ -16,35 +16,44 @@
PREFIX=${HOME}/local
MVN_OPT=
-MVN=mvn $(MVN_OPT)
+SBT=./sbt
+PERL=perl
+SED=sed
-.PHONY: install test release-prepare release-perform clean update-version
+.PHONY: compile archive pack install test release-sonatype clean superdev container
+version:=$(shell $(PERL) -npe "s/version in ThisBuild\s+:=\s+\"(.*)\"/\1/" version.sbt | $(SED) -e "/^$$/d")
-install:
- bin/sbt pack && cd target/pack && $(MAKE) install
-# $(MVN) install -Dmaven.test.skip=true
-# cd utgb-shell; $(MAKE) PREFIX="$(PREFIX)" MVN_OPTS="-Dmaven.test.skip=true" install
+pack:
+ $(SBT) pack
-test: install
- $(MVN) test
+compile:
+ $(SBT) compile
+
+archive: target/utgb-$(version).tgz
+target/utgb-$(version).tgz:
+ $(SBT) pack-archive
-RELEASE_OPT="-DlocalCheckout=true"
+install: pack
+ cd target/pack && $(MAKE) PREFIX=$(PREFIX) install
+
+test: install
+ $(SBT) test
-release-prepare:
- $(MVN) release:prepare $(RELEASE_OPT)
-release-perform:
- $(MVN) release:perform $(RELEASE_OPT)
+release-sonatype:
+ $(SBT) publish-signed
-release-rollback:
- $(MVN) release:rollback
clean:
- $(MVN) clean
+ $(SBT) clean
-update-version:
- $(MVN) release:update-versions -DautoVersionSubmodules=true
+# Run GWT super-dev mode
+superdev:
+ $(SBT) gwt-superdev
+# Run web container for debugging UTGB
+container:
+ $(SBT) "~; container:start; container:reload /"
View
@@ -4,6 +4,16 @@
* Java7 (JDK)
+### Creating IntelliJ project files
+
+ ./sbt gen-idea
+
+
+### Creating Eclipse project files
+
+
+ ./sbt eclipse
+
### Developing UTGB with GWT super-dev mode
@@ -25,11 +35,11 @@
- Open http://localhost:8080/gwt, then click "Dev Mode On".
- If you need to use 192.xx.xx.xx address to access GWT pages, run gwt-superdev mode with -Dgwt.expose=true option
+ If you need to use 192.xx.xx.xx address to access GWT pages, run gwt-superdev mode with -Dgwt.expose option
- ./sbt gwt-superdev -Dgwt.expose=true
+ ./sbt gwt-superdev -Dgwt.expose
- You also need to copy bookmarklet from http://192.xx.xx.xx:9876 since it becomes different when using http://localhost:9876
+ You also need to copy bookmarklet from http://192.xx.xx.xx:9876 since it becomes different from when using http://localhost:9876
* Install utgb command
View
@@ -1,5 +1,7 @@
addSbtPlugin("com.github.mpeltonen" % "sbt-idea" % "1.5.1")
+addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "2.3.0")
+
addSbtPlugin("com.github.gseitz" % "sbt-release" % "0.7.1")
addSbtPlugin("org.xerial.sbt" % "sbt-pack" % "0.3.1")

0 comments on commit 0309baa

Please sign in to comment.