You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@bookkeeper.apache.org by GitBox <gi...@apache.org> on 2018/10/19 00:33:32 UTC

[GitHub] sijie closed pull request #1749: [build] Fix build & bash script error when not using `stream` profile

sijie closed pull request #1749: [build] Fix build & bash script error when not using `stream` profile
URL: https://github.com/apache/bookkeeper/pull/1749
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/.travis.yml b/.travis.yml
index 7c9b257a68..ad53fd5f29 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -39,6 +39,14 @@ matrix:
       env: CUSTOM_JDK="oraclejdk10"
     - os: linux
       env: CUSTOM_JDK="oraclejdk11"
+    - os: osx
+      osx_image: xcode8
+      env:
+        - STREAM_DISABLED="true"
+    - os: linux
+      env: 
+        - CUSTOM_JDK="oraclejdk8"
+        - STREAM_DISABLED="true"
 
 before_install: 
 - |
diff --git a/.travis_scripts/build.sh b/.travis_scripts/build.sh
index f751bd84cf..49e33a9aea 100755
--- a/.travis_scripts/build.sh
+++ b/.travis_scripts/build.sh
@@ -22,16 +22,22 @@ set -ev
 BINDIR=`dirname "$0"`
 BK_HOME=`cd $BINDIR/..;pwd`
 
-mvn --batch-mode clean apache-rat:check compile spotbugs:check install -DskipTests -Dstream
-$BK_HOME/dev/check-binary-license ./bookkeeper-dist/all/target/bookkeeper-all-*-bin.tar.gz;
-$BK_HOME/dev/check-binary-license ./bookkeeper-dist/server/target/bookkeeper-server-*-bin.tar.gz;
-if [ "$DLOG_MODIFIED" == "true" ]; then
-    cd $BK_HOME/stream/distributedlog
-    mvn --batch-mode clean package -Ddistributedlog
-fi
-if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$WEBSITE_MODIFIED" == "true" ]; then
-    cd $BK_HOME/site
-    make clean
-    # run the docker image to build the website
-    ./docker/ci.sh
+if [ "xtrue" == "x${STREAM_DISABLED}" ]; then
+    mvn --batch-mode clean install -DskipTests
+    # this command should be executed correctly
+    ${BK_HOME}/bin/bookkeeper help
+else
+    mvn --batch-mode clean apache-rat:check compile spotbugs:check install -DskipTests -Dstream
+    $BK_HOME/dev/check-binary-license ./bookkeeper-dist/all/target/bookkeeper-all-*-bin.tar.gz;
+    $BK_HOME/dev/check-binary-license ./bookkeeper-dist/server/target/bookkeeper-server-*-bin.tar.gz;
+    if [ "$DLOG_MODIFIED" == "true" ]; then
+        cd $BK_HOME/stream/distributedlog
+        mvn --batch-mode clean package -Ddistributedlog
+    fi
+    if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$WEBSITE_MODIFIED" == "true" ]; then
+        cd $BK_HOME/site
+        make clean
+        # run the docker image to build the website
+        ./docker/ci.sh
+    fi
 fi
diff --git a/bin/bookkeeper b/bin/bookkeeper
index 38280a1d76..a207ff7329 100755
--- a/bin/bookkeeper
+++ b/bin/bookkeeper
@@ -18,6 +18,8 @@
 # * limitations under the License.
 # */
 
+set -e
+
 BINDIR=`dirname "$0"`
 BK_HOME=`cd ${BINDIR}/..;pwd`
 
@@ -36,12 +38,12 @@ fi
 # check the configuration to see if table service is enabled or not.
 if [ -z "${ENABLE_TABLE_SERVICE}" ]; then
   TABLE_SERVICE_SETTING=$(grep StreamStorageLifecycleComponent ${BOOKIE_CONF_TO_CHECK})
-  if [ "${TABLE_SERVICE_SETTING}" != \#* ]; then
+  if [[ "${TABLE_SERVICE_SETTING}" =~ ^extraServerComponents.* ]]; then
     ENABLE_TABLE_SERVICE="true"
   fi
 fi
 
-if [ \( "x$1" == "xstandalone" \) -o \( "x${ENABLE_TABLE_SERVICE}" != "x" \) ]; then
+if [ \( "x$1" == "xstandalone" \) -o \( "x${ENABLE_TABLE_SERVICE}" == "xtrue" \) ]; then
   BOOKIE_MODULE_PATH=stream/server
   BOOKIE_MODULE_NAME="(org.apache.bookkeeper-)?stream-storage-server"
 else
diff --git a/pom.xml b/pom.xml
index af3cefa88a..4d210a34af 100644
--- a/pom.xml
+++ b/pom.xml
@@ -60,13 +60,13 @@
     <module>bookkeeper-benchmark</module>
     <module>bookkeeper-stats-providers</module>
     <module>bookkeeper-http</module>
-    <module>shaded</module>
-    <module>tests</module>
-    <module>bookkeeper-dist</module>
-    <module>microbenchmarks</module>
     <module>stream/distributedlog</module>
     <module>tools</module>
     <module>metadata-drivers</module>
+    <module>bookkeeper-dist</module>
+    <module>shaded</module>
+    <module>microbenchmarks</module>
+    <module>tests</module>
   </modules>
   <mailingLists>
     <mailingList>
diff --git a/tools/pom.xml b/tools/pom.xml
index 37e63751ed..2981bbb022 100644
--- a/tools/pom.xml
+++ b/tools/pom.xml
@@ -27,7 +27,6 @@
   <packaging>pom</packaging>
   <modules>
     <module>framework</module>
-    <module>perf</module>
     <module>all</module>
   </modules>
   <profiles>
@@ -42,6 +41,7 @@
       <modules>
         <!-- enable building stream storage cli -->
         <module>stream</module>
+        <module>perf</module>
       </modules>
     </profile>
   </profiles>


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services