Skip to content

Commit e089b51

Browse files
authored
[build] remove Maven POM files (apache#3009)
* Initial commit for dropping maven * fix gh action * fix typo
1 parent 268c825 commit e089b51

File tree

110 files changed

+55
-8872
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

110 files changed

+55
-8872
lines changed

.github/workflows/pr-validation.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,4 @@ jobs:
4949
- name: Validate pull request
5050
run: ./gradlew build -x spotbugsTest -x signDistTar -x test
5151
- name: Check license files
52-
run: dev/check-all-licenses-gradle
52+
run: dev/check-all-licenses

bin/bookkeeper_gradle

Lines changed: 0 additions & 182 deletions
This file was deleted.

bin/common.sh

Lines changed: 11 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ is_released_binary() {
155155
find_module_jar_at() {
156156
DIR=$1
157157
MODULE=$2
158-
REGEX="^${MODULE}-[0-9\\.]*((-[a-zA-Z]*(-[0-9]*)?)|(-SNAPSHOT))?.jar$"
158+
REGEX="^${MODULE}[-0-9\\.]*((-[a-zA-Z]*(-[0-9]*)?)|(-SNAPSHOT))?.jar$"
159159
if [ -d ${DIR} ]; then
160160
cd ${DIR}
161161
for f in *.jar; do
@@ -196,23 +196,13 @@ find_module_jar() {
196196
fi
197197

198198
if [ -z "${MODULE_JAR}" ]; then
199-
BUILT_JAR=$(find_module_jar_at ${BK_HOME}/${MODULE_PATH}/target ${MODULE_NAME})
199+
BUILT_JAR=$(find_module_jar_at ${BK_HOME}/${MODULE_PATH}/build/libs ${MODULE_NAME})
200200
if [ -z "${BUILT_JAR}" ]; then
201+
echo "${BK_HOME}/${MODULE_PATH}/build/libs" >&2;
201202
echo "Couldn't find module '${MODULE_NAME}' jar." >&2
202-
read -p "Do you want me to run \`mvn package -DskipTests\` for you ? (y|n) " answer
203-
case "${answer:0:1}" in
204-
y|Y )
205-
mkdir -p ${BK_HOME}/logs
206-
output="${BK_HOME}/logs/build.out"
207-
echo "see output at ${output} for the progress ..." >&2
208-
mvn package -DskipTests &> ${output}
209-
;;
210-
* )
211-
exit 1
212-
;;
213-
esac
214-
215-
BUILT_JAR=$(find_module_jar_at ${BK_HOME}/${MODULE_PATH}/target ${MODULE_NAME})
203+
## read -p "Do you want me to run \`mvn package -DskipTests\` for you ? (y|n) " answer
204+
205+
BUILT_JAR=$(find_module_jar_at ${BK_HOME}/${MODULE_PATH}/build/libs ${MODULE_NAME})
216206
fi
217207
if [ -n "${BUILT_JAR}" ]; then
218208
MODULE_JAR=${BUILT_JAR}
@@ -223,28 +213,19 @@ find_module_jar() {
223213
echo "Could not find module '${MODULE_JAR}' jar." >&2
224214
exit 1
225215
fi
226-
echo ${MODULE_JAR}
216+
echo "${MODULE_JAR}"
227217
return
228218
}
229219

230220
add_maven_deps_to_classpath() {
231221
MODULE_PATH=$1
232-
MVN="mvn"
233-
if [ "$MAVEN_HOME" != "" ]; then
234-
MVN=${MAVEN_HOME}/bin/mvn
235-
fi
236-
237222
# Need to generate classpath from maven pom. This is costly so generate it
238223
# and cache it. Save the file into our target dir so a mvn clean will get
239224
# clean it up and force us create a new one.
240-
f="${BK_HOME}/${MODULE_PATH}/target/cached_classpath.txt"
241-
output="${BK_HOME}/${MODULE_PATH}/target/build_classpath.out"
242-
225+
f="${BK_HOME}/${MODULE_PATH}/build/classpath.txt"
243226
if [ ! -f ${f} ]; then
244-
echo "the classpath of module '${MODULE_PATH}' is not found, generating it ..." >&2
245-
echo "see output at ${output} for the progress ..." >&2
246-
${MVN} -f "${BK_HOME}/${MODULE_PATH}/pom.xml" dependency:build-classpath -Dmdep.outputFile="target/cached_classpath.txt" &> ${output}
247-
echo "the classpath of module '${MODULE_PATH}' is generated at '${f}'." >&2
227+
echo "no classpath.txt found at ${BK_HOME}/${MODULE_PATH}/build"
228+
exit 1
248229
fi
249230
}
250231

@@ -258,7 +239,7 @@ set_module_classpath() {
258239
echo ${BK_CLASSPATH}
259240
else
260241
add_maven_deps_to_classpath ${MODULE_PATH} >&2
261-
cat ${BK_HOME}/${MODULE_PATH}/target/cached_classpath.txt
242+
cat ${BK_HOME}/${MODULE_PATH}/build/classpath.txt
262243
fi
263244
return
264245
}

0 commit comments

Comments
 (0)