i just tried to execute mvn from an ant task vor the first time. It doesn't work.
I tried to fix this problem by this .profile file in ~:
export JAVA_HOME=$(/usr/libexec/java_home)
export M2_HOME=/usr/local/Cellar/maven/3.2.3/
PATH=$PATH:$JAVA_HOME/bin:$M2_HOME/bin
export PATH
but still i get this error:
BUILD FAILED /.../build.xml:13: Execute failed: java.io.IOException: Cannot run program "mvn": error=2, No such file or directory
i can run java and maven from the terminal, mvn --version:
Apache Maven 3.2.3 (33f8c3e1027c3ddde99d3cdebad2656a31e8fdf4;
2014-08-11T22:58:10+02:00) Maven home:
/usr/local/Cellar/maven/3.2.3/libexec Java version: 1.8.0_25, vendor:
Oracle Corporation Java home:
/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/jre
Default locale: de_DE, platform encoding: UTF-8 OS name: "mac os x",
version: "10.9.5", arch: "x86_64", family: "mac"
------------
echo $JAVA_HOME
/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home
------------
echo $M2_HOME
/usr/local/Cellar/maven/3.2.3/