Skip to content

Commit

Permalink
Fix issue
Browse files Browse the repository at this point in the history
  • Loading branch information
lhotari committed Jun 3, 2021
1 parent 91e076a commit 3d66e19
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 14 deletions.
9 changes: 6 additions & 3 deletions bin/bookkeeper
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
#
# http://www.apache.org/licenses/LICENSE-2.0
#
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
Expand Down Expand Up @@ -121,7 +121,10 @@ add_maven_deps_to_classpath() {
f="${BK_HOME}/distribution/server/target/classpath.txt"
if [ ! -f "${f}" ]
then
${MVN} -f "${BK_HOME}/pom.xml" dependency:build-classpath -Dmdep.outputFile="${f}" &> /dev/null
(
cd "${BK_HOME}"
${MVN} -pl distribution/server dependency:build-classpath -DincludeScope=runtime -Dmdep.outputFile="${f}" &> /dev/null
)
fi
BOOKIE_CLASSPATH=${CLASSPATH}:`cat "${f}"`
}
Expand Down
5 changes: 4 additions & 1 deletion bin/function-localrunner
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,10 @@ add_maven_deps_to_classpath() {
f="${PULSAR_HOME}/distribution/server/target/classpath.txt"
if [ ! -f "${f}" ]
then
${MVN} -f "${PULSAR_HOME}/pom.xml" dependency:build-classpath -DincludeScope=compile -Dmdep.outputFile="${f}" &> /dev/null
(
cd "${PULSAR_HOME}"
${MVN} -pl distribution/server dependency:build-classpath -DincludeScope=runtime -Dmdep.outputFile="${f}" &> /dev/null
)
fi
PULSAR_CLASSPATH=${CLASSPATH}:`cat "${f}"`
}
Expand Down
5 changes: 4 additions & 1 deletion bin/pulsar
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,10 @@ add_maven_deps_to_classpath() {
f="${PULSAR_HOME}/distribution/server/target/classpath.txt"
if [ ! -f "${f}" ]
then
${MVN} -f "${PULSAR_HOME}/pom.xml" dependency:build-classpath -DincludeScope=compile -Dmdep.outputFile="${f}" &> /dev/null
(
cd "${PULSAR_HOME}"
${MVN} -pl distribution/server dependency:build-classpath -DincludeScope=runtime -Dmdep.outputFile="${f}" &> /dev/null
)
fi
PULSAR_CLASSPATH=${CLASSPATH}:`cat "${f}"`
}
Expand Down
5 changes: 4 additions & 1 deletion bin/pulsar-admin-common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,10 @@ add_maven_deps_to_classpath() {
f="${PULSAR_HOME}/distribution/server/target/classpath.txt"
if [ ! -f "${f}" ]
then
${MVN} -f "${PULSAR_HOME}/pom.xml" dependency:build-classpath -DincludeScope=compile -Dmdep.outputFile="${f}" &> /dev/null
(
cd "${PULSAR_HOME}"
${MVN} -pl distribution/server dependency:build-classpath -DincludeScope=runtime -Dmdep.outputFile="${f}" &> /dev/null
)
fi
PULSAR_CLASSPATH=${CLASSPATH}:`cat "${f}"`
}
Expand Down
15 changes: 9 additions & 6 deletions bin/pulsar-client
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
#
# http://www.apache.org/licenses/LICENSE-2.0
#
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
Expand Down Expand Up @@ -41,14 +41,14 @@ else
fi

# exclude tests jar
RELEASE_JAR=`ls $PULSAR_HOME/pulsar-*.jar 2> /dev/null | grep -v tests | tail -1`
RELEASE_JAR=`ls $PULSAR_HOME/pulsar-*.jar 2> /dev/null | grep -v tests | tail -1`
if [ $? == 0 ]; then
PULSAR_JAR=$RELEASE_JAR
fi

# exclude tests jar
BUILT_JAR=`ls $PULSAR_HOME/pulsar-client-tools/target/pulsar-*.jar 2> /dev/null | grep -v tests | tail -1`
if [ $? != 0 ] && [ ! -e "$PULSAR_JAR" ]; then
if [ $? != 0 ] && [ ! -e "$PULSAR_JAR" ]; then
echo "\nCouldn't find pulsar jar.";
echo "Make sure you've run 'mvn package'\n";
exit 1;
Expand All @@ -61,14 +61,17 @@ add_maven_deps_to_classpath() {
if [ "$MAVEN_HOME" != "" ]; then
MVN=${MAVEN_HOME}/bin/mvn
fi

# Need to generate classpath from maven pom. This is costly so generate it
# and cache it. Save the file into our target dir so a mvn clean will get
# clean it up and force us create a new one.
f="${PULSAR_HOME}/distribution/server/target/classpath.txt"
if [ ! -f "${f}" ]
then
${MVN} -f "${PULSAR_HOME}/pom.xml" dependency:build-classpath -Dmdep.outputFile="${f}" &> /dev/null
(
cd "${PULSAR_HOME}"
${MVN} -pl distribution/server dependency:build-classpath -DincludeScope=runtime -Dmdep.outputFile="${f}" &> /dev/null
)
fi
PULSAR_CLASSPATH=${CLASSPATH}:`cat "${f}"`
}
Expand Down
5 changes: 4 additions & 1 deletion bin/pulsar-perf
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,10 @@ add_maven_deps_to_classpath() {
f="${PULSAR_HOME}/distribution/server/target/classpath.txt"
if [ ! -f "${f}" ]
then
${MVN} -f "${PULSAR_HOME}/pom.xml" dependency:build-classpath -Dmdep.outputFile="${f}" &> /dev/null
(
cd "${PULSAR_HOME}"
${MVN} -pl distribution/server dependency:build-classpath -DincludeScope=runtime -Dmdep.outputFile="${f}" &> /dev/null
)
fi
PULSAR_CLASSPATH=${CLASSPATH}:`cat "${f}"`
}
Expand Down
2 changes: 1 addition & 1 deletion site2/tools/docker-build-site.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ CROWDIN_DOCUSAURUS_API_KEY=${CROWDIN_DOCUSAURUS_API_KEY:-UNSET}

DOCKER_CMD="docker run -i -e CI_USER=$CI_USER -e CI_GROUP=$CI_GROUP -v $HOME/.m2:/root/.m2 -e CROWDIN_DOCUSAURUS_PROJECT_ID=${CROWDIN_DOCUSAURUS_PROJECT_ID} -e CROWDIN_DOCUSAURUS_API_KEY=${CROWDIN_DOCUSAURUS_API_KEY} -v $ROOT_DIR:/pulsar $IMAGE"

$DOCKER_CMD bash -l -c 'cd /pulsar && /pulsar/site2/tools/build-site.sh'
$DOCKER_CMD bash -l -c 'cd /pulsar && rm -f distribution/server/target/classpath.txt && /pulsar/site2/tools/build-site.sh'

0 comments on commit 3d66e19

Please sign in to comment.