サーバー側で手順を自動化するための Java プログラムを作成しています。通常、デスクトップ/GIT/ に移動し、この Maven コマンド「mvn integration-test -DskipTests -P interactive -e」を使用します。
私はJavaプログラムを構築していて、そのコマンドラインを実行しようとしていますが、これまでのところ成功していません.
これまでのところ、コードは次のとおりです。
public static void main(String[] args) throws FileNotFoundException {
// TODO Auto-generated method stub
Process theProcess = null;
try
{
theProcess = Runtime.getRuntime().exec("mvn integration-test -DskipTests -P interactive -e");
}
catch(IOException e)
{
System.err.println("Error on exec() method");
e.printStackTrace();
}
// read from the called program's standard output stream
try
{
inStream = new BufferedReader(new InputStreamReader( theProcess.getInputStream()));
System.out.println(inStream.readLine());
}
catch(IOException e)
{
System.err.println("Error on inStream.readLine()");
e.printStackTrace();
}
break;
}
}
in.close();
}