summaryrefslogtreecommitdiffstats
path: root/bootstrap.sh
diff options
context:
space:
mode:
authorArnstein Ressem <aressem@gmail.com>2017-05-04 14:56:12 +0200
committerGitHub <noreply@github.com>2017-05-04 14:56:12 +0200
commit4dbbd7dc8165bf2674ee6fe2940ea390b2f60fcb (patch)
tree8188338c2f25213612e7820b13852c26a3ac3917 /bootstrap.sh
parent97a43b5f44245f9cc76ed116b231ce883366b03d (diff)
Revert "Bootstrap local Java builds"
Diffstat (limited to 'bootstrap.sh')
-rwxr-xr-xbootstrap.sh51
1 files changed, 16 insertions, 35 deletions
diff --git a/bootstrap.sh b/bootstrap.sh
index 40aa7eb3a21..940179ef020 100755
--- a/bootstrap.sh
+++ b/bootstrap.sh
@@ -14,11 +14,8 @@ elif [ "$1" = "full" ]; then
elif [ "$1" = "java" ]; then
# Build minial set of java modules requires to run mvn install from the source root
MODE=java
-elif [ "$1" = "java-build" ]; then
- # Bootstrap as with "java", then build by passing $2 $3 ... to mvn.
- MODE=java-build
elif [ "$1" = "default" ]; then
- MODE=default
+ :
elif [ "$1" = "-h" -o "$1" = "--help" ]; then
usage
exit 0
@@ -29,46 +26,30 @@ else
fi
mvn_install() {
- mvn install -Dmaven.test.skip=true -Dmaven.javadoc.skip=true "$@"
+ mvn install -Dmaven.test.skip=true -Dmaven.javadoc.skip=true $@
}
# Generate vtag map
top=$(dirname $0)
$top/dist/getversion.pl -M $top > $top/dist/vtag.map
-# NOTES ON BUILDING JAVA MODULES
-#
-# When building a random module like orchestrator, mvn lists 2 plugins as
-# prerequisites in the Reactor summary: bundle-plugin and config-class-plugin.
-#
-# It appears mvn is unable to resolve references to a plugin, if the same mvn
-# program builds the plugin, e.g. getting missing class errors.
-#
-# Therefore, we need to manually build all plugins first, then ensure we build
-# the rest of module without rebuilding the plugins (mvn's -rf). To be more
-# exact, mvn displays the order of modules it will build in the Reactor summary
-# - we need to build all modules up to and including all plugins in that list:
-# . (i.e. parent), annotations, scalalib, bundle-plugin, yolean, vespajlib,
-# configgen, and config-class-plugin. By using mvn -rf we can combine the
-# building of several of these into fewer commands to save time.
-#
-# After bootstrapping, the following mvn command must use -rf to avoid building
-# the plugins again: java-build helps remembering this. So to bootstrap the
-# building of the orchestrator modules and all of its dependencies, do:
-# 'bootstrap.sh java-build -pl orchestrator'.
+# These modules are required to be available to maven for it to calculate the
+# Vespa java dependency graph.
+MODULES="
+ .
+ annotations
+ scalalib
+ bundle-plugin
+ "
-mvn_install -am -pl bundle-plugin
-mvn_install -am -rf configgen -pl config-class-plugin
+for module in $MODULES; do
+ (cd $module && mvn_install -N)
+done
-case "$MODE" in
- java*)
- mvn_install -am -rf yolean -pl vespajlib
+mvn_install -am -pl config-class-plugin -rf configgen
- if test "$MODE" == java-build
- then
- shift
- mvn_install -rf config-lib -am "$@"
- fi
+case "$MODE" in
+ java)
;;
full)
mvn_install -am -pl filedistributionmanager,jrt,linguistics,messagebus -rf yolean