Skip to content
Browse files

upgrade to leiningen 2

  • Loading branch information...
1 parent 5b3bec2 commit 5535d107f5600813bf726d1a83de7abff1c4eafe Jason Jackson committed Aug 15, 2012
View
2 .gitignore
@@ -22,3 +22,5 @@ _release
.lein-deps-sum
*.iml
+/.project/
+/.lein-plugins/
View
32 bin/build_release.sh
@@ -1,29 +1,35 @@
#!/bin/bash
+function quit {
+ exit 1
+}
+trap quit 1 2 3 15 #Ctrl+C exits.
RELEASE=`head -1 project.clj | awk '{print $3}' | sed -e 's/\"//' | sed -e 's/\"//'`
+LEIN=`which lein2 || which lein`
+export LEIN_ROOT=1
echo Making release $RELEASE
DIR=_release/storm-$RELEASE
rm -rf _release
-export LEIN_ROOT=1
-rm *.zip
-rm *jar
-rm -rf lib
-rm -rf classes
-lein deps
-lein jar
-mkdir -p $DIR
-mkdir $DIR/lib
-cp storm*jar $DIR/
-cp lib/*.jar $DIR/lib
+rm -f *.zip
+$LEIN with-profile release clean
+$LEIN with-profile release deps
+$LEIN with-profile release jar
+$LEIN with-profile release pom
+mvn dependency:copy-dependencies
+
+mkdir -p $DIR/lib
+cp target/storm-*.jar $DIR/storm-${RELEASE}.jar
+cp target/dependency/*.jar $DIR/lib
cp CHANGELOG.md $DIR/
echo $RELEASE > $DIR/RELEASE
-cp -R logback $DIR/
-mkdir $DIR/logs
+mkdir -p $DIR/logback
+mkdir -p $DIR/logs
+cp -R logback/cluster.xml $DIR/logback/cluster.xml
mkdir $DIR/conf
cp conf/storm.yaml.example $DIR/conf/storm.yaml
View
8 bin/storm
@@ -242,7 +242,7 @@ def nimbus(klass="backtype.storm.daemon.nimbus"):
cppaths = [STORM_DIR + "/conf"]
jvmopts = parse_args(confvalue("nimbus.childopts", cppaths)) + [
"-Dlogfile.name=nimbus",
- "-Dlogback.configurationFile=" + STORM_DIR + "/logback/production.xml",
+ "-Dlogback.configurationFile=" + STORM_DIR + "/logback/cluster.xml",
]
exec_storm_class(
klass,
@@ -262,7 +262,7 @@ def supervisor(klass="backtype.storm.daemon.supervisor"):
cppaths = [STORM_DIR + "/conf"]
jvmopts = parse_args(confvalue("supervisor.childopts", cppaths)) + [
"-Dlogfile.name=supervisor",
- "-Dlogback.configurationFile=" + STORM_DIR + "/logback/production.xml",
+ "-Dlogback.configurationFile=" + STORM_DIR + "/logback/cluster.xml",
]
exec_storm_class(
klass,
@@ -283,7 +283,7 @@ def ui():
cppaths = [STORM_DIR + "/conf"]
jvmopts = parse_args(confvalue("ui.childopts", cppaths)) + [
"-Dlogfile.name=ui",
- "-Dlogback.configurationFile=" + STORM_DIR + "/logback/production.xml",
+ "-Dlogback.configurationFile=" + STORM_DIR + "/logback/cluster.xml",
]
exec_storm_class(
"backtype.storm.ui.core",
@@ -302,7 +302,7 @@ def drpc():
"""
jvmopts = ["-Xmx768m",
"-Dlogfile.name=drpc",
- "-Dlogback.configurationFile=" + STORM_DIR + "/logback/production.xml"
+ "-Dlogback.configurationFile=" + STORM_DIR + "/logback/cluster.xml"
]
exec_storm_class(
"backtype.storm.daemon.drpc",
View
34 bin/to_maven.sh
@@ -5,32 +5,26 @@ function quit {
trap quit 1 2 3 15 #Ctrl+C exits.
RELEASE=`head -1 project.clj | awk '{print $3}' | sed -e 's/\"//' | sed -e 's/\"//'`
+LEIN=`which lein2 || which lein`
-rm -rf classes
-rm -f *jar
-rm -f *xml
-lein jar
-lein pom
+echo ==== Storm Jar ====
+$LEIN with-profile release clean
+$LEIN with-profile release jar
+$LEIN with-profile release pom
scp storm*jar pom.xml clojars@clojars.org:
+rm -f *.jar *.xml
-rm *jar
-rm -rf classes
+echo ==== Storm-Lib Jar ====
rm conf/logback.xml
-lein jar
-
-cp project.clj orig-project.clj
-sed -i '' -e 's/\[.*logback[^]]*\]//g' project.clj
-sed -i '' -e 's/\[.*log4j-over-slf4j[^]]*\]//g' project.clj
-
-lein pom
-mv orig-project.clj project.clj
-
-mv pom.xml old-pom.xml
-sed 's/artifactId\>storm/artifactId\>storm-lib/g' old-pom.xml > pom.xml
+$LEIN with-profile lib clean
+$LEIN with-profile lib jar
+$LEIN with-profile lib pom
+sed -i '' -e 's/artifactId\>storm/artifactId\>storm-lib/g' pom.xml
mv storm-$RELEASE.jar storm-lib-$RELEASE.jar
scp storm*jar pom.xml clojars@clojars.org:
-rm *xml
-rm *jar
+rm -f *.jar *.xml
+
git checkout conf/logback.xml
+
View
0 logback/production.xml → logback/cluster.xml
File renamed without changes.
View
47 project.clj
@@ -1,19 +1,16 @@
-(defproject storm "0.8.1-wip2-SNAPSHOT"
- :source-path "src/clj"
- :test-path "test/clj"
- :java-source-path "src/jvm"
- :javac-options {:debug "true" :fork "true"}
- :resources-path "conf"
- :dev-resources-path "src/dev"
- :repositories {"sonatype" "http://oss.sonatype.org/content/groups/public/"}
+(defproject storm/storm "0.8.1-wip2-SNAPSHOT"
+ :url "http://storm-project.clj"
+ :description "Distributed and fault-tolerant realtime computation"
+ :license {:name "Eclipse Public License - Version 1.0" :url "https://github.com/nathanmarz/storm/blob/master/LICENSE.html"}
+
:dependencies [[org.clojure/clojure "1.4.0"]
[commons-io "1.4"]
[org.apache.commons/commons-exec "1.1"]
[storm/libthrift7 "0.7.0"
- :exclusions [org.slf4j/slf4j-api]]
+ :exclusions [org.slf4j/slf4j-api]]
[clj-time "0.4.1"]
[com.netflix.curator/curator-framework "1.0.1"
- :exclusions [log4j/log4j]]
+ :exclusions [log4j/log4j]]
[backtype/jzmq "2.1.0"]
[com.googlecode.json-simple/json-simple "1.1"]
[compojure "0.6.4"]
@@ -27,14 +24,28 @@
[storm/tools.cli "0.2.2"]
[com.googlecode.disruptor/disruptor "2.10.1"]
[storm/jgrapht "0.8.3"]
- [com.google.guava/guava "13.0"]
+ [com.google.guava/guava "13.0"]]
+
+ :source-paths ["src/clj"]
+ :java-source-paths ["src/jvm"]
+ :test-paths ["test/clj"]
+ :resource-paths ["conf"]
+
+ :profiles {:dev {:resource-paths ["src/dev"]
+ :dependencies [[ch.qos.logback/logback-classic "1.0.6"]
+ [org.slf4j/log4j-over-slf4j "1.6.6"]]}
+ :release {:dependencies [[ch.qos.logback/logback-classic "1.0.6"]
+ [org.slf4j/log4j-over-slf4j "1.6.6"]]}
+ :lib {:dependencies [[ch.qos.logback/logback-classic "1.0.6"]
+ [org.slf4j/log4j-over-slf4j "1.6.6"]]}}
- [ch.qos.logback/logback-classic "1.0.6"]
- [org.slf4j/log4j-over-slf4j "1.6.6"]]
- :dev-dependencies [
- [swank-clojure "1.4.0-SNAPSHOT" :exclusions [org.clojure/clojure]]
- ]
+ :plugins [[lein-swank "1.4.4"]]
+
+ :repositories {"sonatype"
+ "http://oss.sonatype.org/content/groups/public/"}
+
+ :javac-options {:debug true}
:jvm-opts ["-Djava.library.path=/usr/local/lib:/opt/local/lib:/usr/lib"]
- :extra-classpath-dirs ["src/ui"]
+
:aot :all
-)
+ :min-lein-version "2.0.0")
View
2 src/clj/backtype/storm/daemon/supervisor.clj
@@ -411,7 +411,7 @@
" -Djava.library.path=" (conf JAVA-LIBRARY-PATH)
" -Dlogfile.name=" logfilename
" -Dstorm.home=" (System/getProperty "storm.home")
- " -Dlogback.configurationFile=logback/production.xml"
+ " -Dlogback.configurationFile=logback/cluster.xml"
" -cp " classpath " backtype.storm.daemon.worker "
(java.net.URLEncoder/encode storm-id) " " (:supervisor-id supervisor)
" " port " " worker-id)]

0 comments on commit 5535d10

Please sign in to comment.
Something went wrong with that request. Please try again.