3
0
Fork 0
forked from mirrors/nixpkgs

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
mkdir -p $out
cp -r $name/* $out
mkdir -p $out/maven
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
if [ -e $out/bin/maven ]
if [ -e $out/maven/bin/maven ]
then
export OLD_HOME=$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
fi