2012-03-22 9 views
1

私はEclipse(Helios)をUbuntuで動かしています。私はexec Mavenプラグインを追加しました。私がMavenビルドを実行しようとすると、IO Exceptionになってしまいます。Ubuntu exce Maven Plugin

私のプロジェクトディレクトリでJavaを実行しようとしていますので、IO例外を取得してください。 自分のJAVA_HOME、MAVEN_HOMEを設定しましたが、プロジェクトディレクトリからJavaを実行しようとしています。

pomファイル&を例外として追加しました。

<plugin> 
      <groupId>org.codehaus.mojo</groupId> 
      <artifactId>exec-maven-plugin</artifactId> 

      <version>1.2</version> 
      <executions> 
       <execution> 
        <id>kilim-weave</id> 
        <phase>process-classes</phase> 

        <goals> 
         <goal>exec</goal> 
        </goals> 
       </execution> 
      </executions> 

      <configuration> 
       <executable>java</executable> 

       <arguments> 
        <argument>-Dmyproperty=myvalue</argument> 
        <argument>-classpath</argument> 
        <classpath/> 
        <argument>kilim.tools.Weaver</argument> 
        <argument>-d</argument> 
        <argument>${project.build.outputDirectory}</argument> 
        <argument>${project.build.outputDirectory}/com/contivo/smf</argument> 
       </arguments> 
      </configuration> 
     </plugin> 

によって引き起こさ:にjava.io.IOException:にjava.io.IOException:エラー= 2、ジャワでそのようなファイルやディレクトリ (ディレクトリ内に "私のプロジェクトのディレクトリを")プログラムの "Java" を実行できません.lang.ProcessBuilder.start(ProcessBuilder.java:460) at java.lang.Runtime.exec(Runtime.java:593) at org.apache.commons.exec.launcher.Java13CommandLauncher.exec(Java13CommandLauncher.java:58) ) at org.apache.commons.exec.DefaultExecutor.launch(DefaultExecutor.java:246) at org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:302) at org.apache.commons.exec .DefaultExecutor.execute(DefaultExecutor.java:14) 9)org.codehaus.mojo.exec.ExecMojo.executeCommandLine(ExecMojo.java:589)org.codehaus.mojo.exec.ExecMojo.execute(ExecMojo.java:335) で における... 21より

私は設定がありません。

ありがとうございます。

サシッシュです。

+1

PATHにjavaがありますか? –

+0

javaは私のパスにあります –

答えて

0

実行可能コマンド実行可能なフルパスまたは実行可能な名前を指定できます。後者の場合、実行ファイルはPATH内に存在していなければなりません。

プラグインは次の順序で実行を検索します:私は完全なパスを試してみた

relative to the root of the project 
as toolchain executable 
relative to the working directory (Windows only) 
relative to the directories specified in the system property PATH (Windows Only) 

、それが動作します。

1

Put it in the PATH - Mavenは、javaとjavacがあなたのPATHに含まれているとはるかによく動作します。

+0

この特定の情報のためにこれを行う方法はありますか? – streetlight