I am currently writing a Jenkins plugin, where I have a button that starts 
a build. 
In the Java code that is executed when the user clicks the button, there 
are some cleartool commands. 
First, it creates a view:

Runtime.getRuntime().exec("cmd.exe /c cleartool mkview -tag " + viewTag + " " + 
viewPath);


Then there is a call to a method that creates the config spec file and 
writes the correct content to it:

createFile();


After that it updates the config spec:

Runtime.getRuntime().exec("cmd.exe /c cleartool setcs -tag " + viewTag + " " + 
path");


And at the and of the method it starts the build:

Hudson.getInstance().getQueue().schedule(project, 0, new CauseAction(new 
Cause.UserIdCause()));


 
  I am currently writing a Jenkins plugin, where I have a button that 
starts a build. 
In the Java code that is executed when the user clicks the button, there 
are some cleartool commands. 
First, it creates a view:

Runtime.getRuntime().exec("cmd.exe /c cleartool mkview -tag " + viewTag + " " + 
viewPath);


Then there is a call to a method that creates the config spec file and 
writes the correct content to it:

createFile();

After that it updates the config spec:

Runtime.getRuntime().exec("cmd.exe /c cleartool setcs -tag " + viewTag + " " + 
path");


And at the and of the method it starts the build:

Hudson.getInstance().getQueue().schedule(project, 0, new CauseAction(new 
Cause.UserIdCause()));


First, there was the problem that the config spec wasn't set correctly, it 
was always missing several lines. I inserted Thread.sleep(1000) in the code 
in order to wait for the createFile-method to finish writing the file. Now 
the config spec seems to be set correctly, so I assume that this issue is 
done. 

However, I now have another problem:
When I go to the ClearCase Explorer, look at the properties of my view and 
select the tab 'Profile', I get the following error message:



*Can not determine if the view is associated. The config spec for the 
'myViewTag' view has been modified outside of the ClearCase View Profile 
tools, and can no longer be interpreted by the tools. Would you like to 
attempt an automatic recovery of the config spec?*

Is there anything I can do to handle or avoid this error?

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to