Skip to content

Commit

Permalink
convert to multimodule setup (everything in essentially one module bu…
Browse files Browse the repository at this point in the history
…t setup for more), redo build_release.sh and to_maven.sh scripts to work appropriately with new setup
  • Loading branch information
nathanmarz committed Apr 17, 2013
1 parent 220f924 commit 0e74f00
Show file tree
Hide file tree
Showing 559 changed files with 185 additions and 82 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.lein-repl-history
/classes
/lib
deploy/lib
Expand All @@ -22,6 +23,7 @@ _release
.lein-deps-sum
*.iml
/target
/storm-core/target
/.project/
/.lein-plugins/
*.ipr
Expand Down
3 changes: 3 additions & 0 deletions MODULES
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
storm-console-logging
storm-core

1 change: 1 addition & 0 deletions VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.9.0-wip17
25 changes: 25 additions & 0 deletions bin/build_modules.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash

LEIN=`which lein2 || which lein`
export LEIN_ROOT=1


for module in $(cat MODULES)
do
echo "Building $module"
cd $module
if [ $module != "storm-console-logging" ]
then
rm ../conf/logback.xml
fi


$LEIN with-profile release clean
$LEIN with-profile release deps
$LEIN with-profile release jar
$LEIN with-profile release install
$LEIN with-profile release pom

git checkout ../conf/logback.xml
cd ..
done
28 changes: 17 additions & 11 deletions bin/build_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,31 @@ 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/\"//'`
RELEASE=`cat VERSION`
LEIN=`which lein2 || which lein`
export LEIN_ROOT=1

echo Making release $RELEASE

DIR=_release/storm-$RELEASE
DIR=`pwd`/_release/storm-$RELEASE

rm -rf _release
rm -f *.zip
$LEIN with-profile release clean || exit 1
$LEIN with-profile release deps || exit 1
$LEIN with-profile release jar || exit 1
$LEIN with-profile release pom || exit 1
mvn dependency:copy-dependencies || exit 1

$LEIN pom || exit 1
mkdir -p $DIR/lib
cp target/storm-*.jar $DIR/storm-${RELEASE}.jar
cp target/dependency/*.jar $DIR/lib


sh bin/build_modules.sh

for module in $(cat MODULES)
do
cd $module
mvn dependency:copy-dependencies || exit 1
cp -f target/dependency/*.jar $DIR/lib/
cp -f target/*.jar $DIR/
cd ..
done

cp CHANGELOG.md $DIR/

echo $RELEASE > $DIR/RELEASE
Expand All @@ -34,7 +40,7 @@ cp -R logback/cluster.xml $DIR/logback/cluster.xml
mkdir $DIR/conf
cp conf/storm.yaml.example $DIR/conf/storm.yaml

cp -R src/ui/public $DIR/
cp -R storm-core/src/ui/public $DIR/

cp -R bin $DIR/

Expand Down
2 changes: 1 addition & 1 deletion bin/javadoc.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
mkdir -p doc
javadoc -d doc-$1/ `find src -name "*.java" | grep -v generated`
javadoc -d doc-$1/ `find . -name "*.java" | grep -v generated`
52 changes: 31 additions & 21 deletions bin/to_maven.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,34 @@ 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`

echo ==== Storm Jar ====
$LEIN with-profile release clean
$LEIN with-profile release jar
$LEIN with-profile release pom
scp target/storm*jar pom.xml clojars@clojars.org:
rm -Rf target *.xml

echo ==== Storm-Lib Jar ====
rm conf/logback.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 target/storm-$RELEASE.jar target/storm-lib-$RELEASE.jar
scp target/storm*jar pom.xml clojars@clojars.org:
rm -Rf target *.xml

git checkout conf/logback.xml
RELEASE=`cat VERSION`
LEIN=`which lein2 || which lein`
export LEIN_ROOT=1


sh bin/build_modules.sh

echo ==== Module jars ====
for module in $(cat MODULES)
do
cd $module
scp target/*jar pom.xml clojars@clojars.org:
cd ..
done


#L

echo ==== Storm jar ====
$LEIN clean
$LEIN pom
$LEIN jar
scp pom.xml target/*jar clojars@clojars.org:

echo ==== Storm-lib jar ====
cd storm-lib
$LEIN clean
$LEIN pom
$LEIN jar
scp pom.xml target/*jar clojars@clojars.org:
cd ..
64 changes: 15 additions & 49 deletions project.clj
Original file line number Diff line number Diff line change
@@ -1,52 +1,18 @@
(defproject storm/storm "0.9.0-wip16"
(def VERSION (slurp "VERSION"))
(def MODULES (-> "MODULES" slurp (.split "\n")))
(def DEPENDENCIES (for [m MODULES] [(symbol (str "storm/" m)) VERSION]))

;; for lib pom.xml, change the symbol to storm/storm-liba and filter out storm-console-logging from modules

(eval `(defproject storm/storm ~VERSION
:url "http://storm-project.net"
: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]]
[clj-time "0.4.1"]
[com.netflix.curator/curator-framework "1.0.1"
:exclusions [log4j/log4j]]
[backtype/jzmq "2.1.0"]
[com.googlecode.json-simple/json-simple "1.1"]
[compojure "1.1.3"]
[hiccup "0.3.6"]
[ring/ring-devel "0.3.11"]
[ring/ring-jetty-adapter "0.3.11"]
[org.clojure/tools.logging "0.2.3"]
[org.clojure/math.numeric-tower "0.0.1"]
[storm/carbonite "1.5.0"]
[org.yaml/snakeyaml "1.9"]
[org.apache.httpcomponents/httpclient "4.1.1"]
[storm/tools.cli "0.2.2"]
[com.googlecode.disruptor/disruptor "2.10.1"]
[storm/jgrapht "0.8.3"]
[com.google.guava/guava "13.0"]
[ch.qos.logback/logback-classic "1.0.6"]
[org.slf4j/log4j-over-slf4j "1.6.6"]
]

:source-paths ["src/clj"]
:java-source-paths ["src/jvm"]
:test-paths ["test/clj"]
:resource-paths ["conf"]

:profiles {:dev {:resource-paths ["src/dev"]
:dependencies [[org.mockito/mockito-all "1.9.5"]]}
:release {}
:lib {}
}

:plugins [[lein-swank "1.4.4"]]

:repositories {"sonatype"
"http://oss.sonatype.org/content/groups/public/"}

:javac-options ["-g"]
:jvm-opts ["-Djava.library.path=/usr/local/lib:/opt/local/lib:/usr/lib"]

:aot :all
:min-lein-version "2.0.0")
:mailing-list {:name "Storm user mailing list"
:archive "https://groups.google.com/group/storm-user"
:post "storm-user@googlegroups.com"}
:dependencies [~@DEPENDENCIES]
:plugins [[~'lein-sub "0.2.1"]]
:min-lein-version "2.0.0"
:sub [~@MODULES]
))
1 change: 1 addition & 0 deletions storm-console-logging/logback/logback.xml
10 changes: 10 additions & 0 deletions storm-console-logging/project.clj
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
(def ROOT-DIR (subs *file* 0 (- (count *file*) (count "project.clj"))))
(def VERSION (-> ROOT-DIR (str "/../VERSION") slurp))

(defproject storm/storm-console-logging VERSION
:resource-paths ["logback"]

:profiles {:release {}
}

:aot :all)
11 changes: 11 additions & 0 deletions storm-core/.lein-repl-history
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
(slurp
)
(doc slurp)
(def f (slurp "../project.clj"))
f
(def form (read-string f))
form
(doc read-string)
(last form)
(def VERSION (-> "../project.clj" slurp read-string last))
VERSION
51 changes: 51 additions & 0 deletions storm-core/project.clj
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
(def ROOT-DIR (subs *file* 0 (- (count *file*) (count "project.clj"))))
(def VERSION (-> ROOT-DIR (str "/../VERSION") slurp))

(defproject storm/storm-core VERSION
: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]]
[clj-time "0.4.1"]
[com.netflix.curator/curator-framework "1.0.1"
:exclusions [log4j/log4j]]
[backtype/jzmq "2.1.0"]
[com.googlecode.json-simple/json-simple "1.1"]
[compojure "1.1.3"]
[hiccup "0.3.6"]
[ring/ring-devel "0.3.11"]
[ring/ring-jetty-adapter "0.3.11"]
[org.clojure/tools.logging "0.2.3"]
[org.clojure/math.numeric-tower "0.0.1"]
[storm/carbonite "1.5.0"]
[org.yaml/snakeyaml "1.9"]
[org.apache.httpcomponents/httpclient "4.1.1"]
[storm/tools.cli "0.2.2"]
[com.googlecode.disruptor/disruptor "2.10.1"]
[storm/jgrapht "0.8.3"]
[com.google.guava/guava "13.0"]
[ch.qos.logback/logback-classic "1.0.6"]
[org.slf4j/log4j-over-slf4j "1.6.6"]
]

:source-paths ["src/clj"]
:java-source-paths ["src/jvm"]
:test-paths ["test/clj"]
:resource-paths ["../conf"]

:profiles {:dev {:resource-paths ["src/dev"]
:dependencies [[org.mockito/mockito-all "1.9.5"]]}
:release {}
:lib {}
}

:plugins [[lein-swank "1.4.4"]]

:repositories {"sonatype"
"http://oss.sonatype.org/content/groups/public/"}

:javac-options ["-g"]
:jvm-opts ["-Djava.library.path=/usr/local/lib:/opt/local/lib:/usr/lib"]

:aot :all)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 0e74f00

Please sign in to comment.