maven: move to dedicated directory to prevent clashes with other java applications

This commit is contained in:
Nikolay Amiantov 2015-08-03 20:53:30 +03:00
parent a8788c4d6a
commit 52fb36e7e0

View File

@ -2,16 +2,16 @@ source $stdenv/setup
unpackPhase unpackPhase
mkdir -p $out mkdir -p $out/maven
cp -r $name/* $out cp -r $name/* $out/maven
wrapProgram $out/bin/mvn --set JAVA_HOME "$jdk" makeWrapper $out/maven/bin/mvn $out/bin/mvn --set JAVA_HOME "$jdk"
# Add the maven-axis and JIRA plugin by default when using maven 1.x # Add the maven-axis and JIRA plugin by default when using maven 1.x
if [ -e $out/bin/maven ] if [ -e $out/maven/bin/maven ]
then then
export OLD_HOME=$HOME export OLD_HOME=$HOME
export HOME=. export HOME=.
$out/bin/maven plugin:download -DgroupId=maven-plugins -DartifactId=maven-axis-plugin -Dversion=0.7 $out/maven/bin/maven plugin:download -DgroupId=maven-plugins -DartifactId=maven-axis-plugin -Dversion=0.7
export HOME=OLD_HOME export HOME=OLD_HOME
fi fi