nixpkgs-suyu/pkgs/misc/maven/builder.sh
Roy van den Broek 1b9e08ee8e D'oh! Only download one version of the maven-axis-plugin...
svn path=/nixpkgs/trunk/; revision=5139
2006-04-04 09:30:09 +00:00

23 lines
636 B
Bash

source $stdenv/setup
source $makeWrapper
unpackPhase
mkdir -p $out
cp -r $name/* $out
# Make a backup of the original directory
cp -r $out/bin $out/bin-orig
# Remove the original mvn from the bin directory
rm $out/bin/$mavenBinary
# Set the JAVA_HOME variable when using Maven
makeWrapper "$out/bin-orig/$mavenBinary" "$out/bin/$mavenBinary" --set JAVA_HOME "$jdk"
# Add the maven-axis and JIRA plugin by default when using maven 1.x
if [ -e $out/bin/maven ]
then
export OLD_HOME=$HOME
export HOME=.
$out/bin/maven plugin:download -DgroupId=maven-plugins -DartifactId=maven-axis-plugin -Dversion=0.7
export HOME=OLD_HOME
fi