Skip to content

Commit

Permalink
Fix Makefile for sbt. Add sbt-eclipse project plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
xerial committed Sep 10, 2013
1 parent 780ecf6 commit 0309baa
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 21 deletions.
45 changes: 27 additions & 18 deletions Makefile
Expand Up @@ -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 /"

16 changes: 13 additions & 3 deletions development.md
Expand Up @@ -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

Expand All @@ -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
Expand Down
2 changes: 2 additions & 0 deletions project/plugins.sbt
@@ -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")
Expand Down

0 comments on commit 0309baa

Please sign in to comment.