changing the path of running maven commands
===

i want to execute a maven commmand in java code so i used this and it works fine

     String[] command = {"CMD", "/C", "mvn -Dit.test="+className+" verify"};
     ProcessBuilder probuilder = new ProcessBuilder( command );
     //You can set up your work directory
     probuilder.directory(new File("C:\\Users\\neila\\workspace\\SeleniumebDriverProject"));
     
     
     Process process = probuilder.start();
 But the work directory (The maven project:"C:\\Users\\neila\\workspace\\SeleniumebDriverProject") is fixed so i want it more relative and flexible , so i change it by the project uri under tomcat i mean this uri :C:\software\apache-tomcat-7\apache-tomcat-7.0.28\wtpwebapps\SeleniumebDriverProject

so when i run it it tells me that there's no pom.xml file in the directory .

Finally my goal is to run the maven command under tomcat and not under my workspace so the maven project should  be copied in tomcat folder .

What do you think 
what is the best solution