Skip to content

Commit

Permalink
apache-maven: Update to version 3.8.4
Browse files Browse the repository at this point in the history
Some newer projects (Neo4j) are unhappy with the older version 3.6.0
  • Loading branch information
thomas committed Jan 10, 2022
1 parent c9be859 commit 2d86a58
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions apache-maven-3.8.4-0.build.sh
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

0 comments on commit 2d86a58

Please sign in to comment.