Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
Some newer projects (Neo4j) are unhappy with the older version 3.6.0
1 contributor

Users who have contributed to this file

executable file 48 lines (35 sloc) 1.14 KB
#! /bin/bash
PKG=apache-maven
VERSION=3.8.4
BUILD=0
# Orig: https://dlcdn.apache.org/maven/maven-3/3.8.4/source/apache-maven-3.8.4-src.tar.gz
URL=https://beehive.molgen.mpg.de/ae8674b3ec8e901066d17b33b45eeb21/apache-maven-3.8.4-src.tar.gz
SRC=$( echo $URL | rev | cut -d/ -f1 | rev )
PREFIX=/pkg/$PKG-$VERSION-$BUILD
set -xe
umask 022
# Note: setting HOME doesn't prevent maven from placing files in
# /scratch/local/build_home/.m2/repository
exec </dev/null
PATH=/bin:/usr/bin:/usr/sbin:/usr/local/package/bin:/usr/local/bin
mkdir -p $PREFIX
cat >$PREFIX/profile <<-EOF
PATH=$PREFIX/bin:\$PATH
EOF
. $PREFIX/profile
# this won't work, maven commits suicide by deleting $PREFIX after a 'failed' clean -- oops :)
# BUILDDIR=$PREFIX/build
# I'm curious what will happen when the prefix is set to /usr.
COOKIE=$(mcookie)
BUILDDIR=/scratch/local2/maven_build-$COOKIE
mkdir -p $BUILDDIR
cd $BUILDDIR
test -e $SRC || wget $URL
test -d $PKG-$VERSION || tar xf $SRC
cd $PKG-$VERSION
# dear maven, you can not delete $PREFIX ...
mvn -DdistributionTargetDir="$PREFIX/__tmp__" clean package
mv $PREFIX/__tmp__/* $PREFIX
rmdir $PREFIX/__tmp__
rm -r $BUILDDIR
exit