I am trying to execute a command through the windows cmd
via ProcessBuilder(which is invoked by maven target, which in turn is a jenkins triggered job) but it is not being executed.
Here is my workflow so far.
- Jenkins I have a job
SomeJob
, which is manually triggered. One of the targets from my maven project is
mvn compile exec:java
and in mypom.xml
I have http://pastebin.com/SfDsxfJmIn the flow of my main class, I have
ProcessBuilder builder = new ProcessBuilder("CMD", "/C", my_executable.exe,sourcefile,destfile); builder.start();
However, when I trigger the jenkins build, it does not throw any error, but the destination files are not generated. All paths are absolute as of now, but still I am having the issue.
If I run the maven command, directly on the slave,
mvn -f C:\\myproject\pom.xml mvn compile exec:java
Then the files are generated as usual. I am unable to proceed as to how to debug this issue. Any help is appreciated. Thanks