私は最近 Macbook Air を購入し、現在は Mountain Lion を実行していますが、会社のプロジェクトの実行にいくつか問題があります。仕事で Mac を使用している唯一の人は Macbook Pro で Lion を実行しており、彼にはそのような問題はありませんでした。タイトルにあるように、コマンド ラインでプロジェクトをコンパイルしても問題はありませんが、IntelliJ 内でコンパイルしようとすると、このエラーが発生します。
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec (requireJS-Optimizer) on project MarfeelTouch: Command execution failed. Cannot run program "node" (in directory "/Users/pedrompg/Documents/Marfeel/MarfeelTouch"): error=2, No such file or directory -> [Help 1]
コマンドラインからコンパイルしてプログラムを実行しようとすると、問題も発生します
Caused by: java.util.concurrent.ExecutionException: java.io.IOException: Cannot run program "phantomjs" (in directory "/Users/pedrompg/Documents/Tenants/vhosts/discoverint"): error=2, No such file or directory
at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:232) ~[na:1.6.0_35]
at java.util.concurrent.FutureTask.get(FutureTask.java:91) ~[na:1.6.0_35]
at com.marfeel.pressSystem.impl.SectionPressImpl.getAllItemsFromSectionFeeds(SectionPressImpl.java:137) ~[MarfeelPressSystem-1.0.jar:na]
... 29 common frames omitted
プロジェクト内からコマンドラインプログラムを実行できないようです
これは、phantomJS の呼び出し方法です。
private Process buildProcess() throws IOException {
Process process;
String[] invocationCmd = getInvocationCmd();
if (executionDirectory != null) {
if (LOG.isDebugEnabled()) {
LOG.info("Invoking PhantomJS with {} in {}.", Arrays.toString(invocationCmd), executionDirectory);
}
process = Runtime.getRuntime().exec(invocationCmd, null,
new File(executionDirectory));
} else {
if (LOG.isDebugEnabled()) {
LOG.info("Invoking PhantomJS with {} in {}.", Arrays.toString(invocationCmd));
}
process = Runtime.getRuntime().exec(invocationCmd, null);
}
return process;
}
getInvocationCmd() は次の配列を返します
[phantomjs,--load-images=no,--disk-cache=yes,--max-disk-cache-size=1048576,/Users/pedrompg/Documents/Marfeel/MarfeelHub/target/webapp/WEB-INF/classes/whiteCollar.js,marca/marca.js,http://www.marca.com/]
関連情報を残しているかどうかわからない プロジェクトでは Maven、tomcat 7、nodeJS、phantomJS 1.5、nginx 1.2.4、Java 1.6.0_35 を使用しています
誰かが助けてくれることを願っています.私はこれについて本当に心配しています.この問題を解決するためにすでに2日間無駄にしています.
前もって感謝します