I’m Running My Eclipse (Helios) in Ubuntu. I’ve added exec Maven Plug in. When i try to run Maven build I’m getting on IO Exception.
It’s try to execute Java in my Project Directory, so Getting on IO Exception.
I’ve Set up My JAVA_HOME, MAVEN_HOME, still it try to run Java from my project Directory.
I’ve added my pom file & the exception.
<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>
Caused by: java.io.IOException: Cannot run program “java” (in directory “MY Project DIrectory”): java.io.IOException: error=2, No such file or directory
at 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:149)
at org.codehaus.mojo.exec.ExecMojo.executeCommandLine(ExecMojo.java:589)
at org.codehaus.mojo.exec.ExecMojo.execute(ExecMojo.java:335)
… 21 more
is there any Configuration I’m missing.
Thanks in advance
Sathish.
The executable command Can be a full path or a the name executable. In the latter case, the executable must be in the PATH for the execution to work.
The plugin will search for the executable in the following order:
i’ve tried with full path, it works.