-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
apache-maven: Update to version 3.8.4
Some newer projects (Neo4j) are unhappy with the older version 3.6.0
- Loading branch information
Showing
1 changed file
with
48 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
#! /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 |