Reputation: 919
I want to execute cleartool command cleartool lstype -kind -lbtype -s -inv \VoB
from Java applications. Later I need to import this plugin in Jenkins and only have to give the name of VoB
as input argument. So far I tried to find out how such commands are implemented in ClearCase Plugin but unable to find a hint how I can implement it in my plugin. Does anybody have an idea how to proceed further or any previous implementation?
Upvotes: 1
Views: 385
Reputation: 1323793
One workaround would be to execute the cleartool
command in a Runtime.exec()
Java process.
See for instance this thread:
Process p = Runtime.getRuntime().exec(cmd2);
// For normal stream reading
BufferedReader br1 = new BufferedReader(
new InputStreamReader(
p.getInputStream()));
Otherwise, the latest versions of the Jenkins ClearCase plugin use cleartool
(issue JENKINS-15196), so using a CleartoolCommand
should work.
You can build any command you want, as shown in:
hudson/plugins/clearcase/command/LsHistoryCommand
test/java/hudson/plugins/clearcase/command/LsHistoryCommandTest
.Upvotes: 1