New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Eff.sc could not find "mvn" executable #2
Comments
Same happens in a windows cmd.exe console. |
I found the cause (in http://stackoverflow.com/questions/6979155/cannot-run-scala-through-processbuilder). It worked when i changed "mvn" to "mvn.bat". So to be portable it should either check the OS or if does not find "mvn" also try "mvn.bat". |
Please verify the solution. |
It does not, but neither my workaround to hardcode "mvn.bat", so I suppose something weired has happened to my PATH here, but it correctly detected to use "mvn.bat", so if it works in UNIX like systems too, I guess we could assume that the problem should be solved. |
Please write PR if you have more flexible solution. |
$ scala ~/progs/mvn2sbt/Eff.sc .
You are called "scala Eff ."
Creating .\dependencyTree.txt.
Exception in thread "Thread-0" java.io.IOException: Cannot run program "mvn" (in
directory "."): CreateProcess error=2, The system cannot find the file specifie
d
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
at scala.sys.process.ProcessBuilderImpl$Simple.run(ProcessBuilderImpl.sc
ala:69)
at scala.sys.process.ProcessImpl$PipedProcesses.runAndExitValue(ProcessI
mpl.scala:133)
at scala.sys.process.ProcessImpl$CompoundProcess$$anonfun$1.apply$mcV$sp
(ProcessImpl.scala:94)
at scala.sys.process.ProcessImpl$Spawn$$anon$1.run(ProcessImpl.scala:23)
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find th
e file specified
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.(ProcessImpl.java:386)
at java.lang.ProcessImpl.start(ProcessImpl.java:137)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
... 4 more
java.lang.RuntimeException: No exit code: process destroyed.
at scala.sys.process.ProcessImpl$CompoundProcess.exitValue(ProcessImpl.s
cala:88)
at scala.sys.process.ProcessBuilderImpl$AbstractBuilder.$bang(ProcessBui
lderImpl.scala:112)
at Main$$anon$1$$anonfun$1.apply(Eff.sc:40)
"mvn" is in the path:
$ which mvn
/c/apache-maven-3.2.3/bin/mvn
This is Cygwin (bundled with Git for windows)
The text was updated successfully, but these errors were encountered: