Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

maven can't find path specified

I have some problems building my project with maven on my windows machine and I discovered that even "mvn version" not completes correctly. It ends with "the system cannot find the path specified"

D:\my_project\nl.esi.poosl.maven>mvn -v
Apache Maven 3.2.3 (33f8c3e1027c3ddde99d3cdebad2656a31e8fdf4; 2014-08-11T22:58:10+02:00)
Maven home: C:\apache-maven-3.2.3
Java version: 1.8.0_20, vendor: Oracle Corporation
Java home: C:\Java\jdk1.8.0_20\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 7", version: "6.1", arch: "amd64", family: "dos"
The system cannot find the path specified.
D:\my_project\nl.esi.poosl.maven>

environment variables:

PATH: %JAVA_HOME%\bin;%M2%;C:\Windows\Microsoft.NET\Framework\v4.0.30319;D:\sytemapps\Python27;%M2%;%JAVA_HOME%/bin;C:\Developer\Android\sdk\platform-tools\;%GRADLE_HOME%\bin;%DEVKIT_HOME%\bin;%DEVKIT_HOME%\mingw\bin

JAVA_HOME: C:\Java\jdk1.8.0_20

M2: %M2_HOME%\bin

M2_HOME: C:\apache-maven-3.2.3

I can't find the reason why "The system cannot find the path specified." is printed out because it probably is the reason why my project won't build.

like image 769
Staalk Avatar asked Dec 05 '14 07:12

Staalk


1 Answers

Your %JAVA_HOME% is pointing to a JRE. A JRE usually doesn't have javac. Could this be the source of the issue?

Other than that, my environment is the same as yours and it runs fine.

What does your pom.xml look like?

like image 176
Leland Barton Avatar answered Oct 12 '22 00:10

Leland Barton