I use the following code to create a new project and add two build configurations to it in my plug-in:
SProject newProject = myProjectManager.createProject("test");
SBuildType newBuildType1 = newProject.createBuildType("test1");
SBuildType newBuildType2 = newProject.createBuildType("test2");
After running this code, the project and build configurations are all created successfully because I can see them in the web UI.
Also, there are messages in the file teamcity-server.log reporting that the project and build cfgs are created.
However, after I restart TC server, this project including the two build cfgs are all lost as if they were never created.
I know TC projects are saved at %TeamCity_Data_Directory%\config. I also can see a folder named "test" under the directory.
After comparing with the proper project folders, it seems like that the "test" folder lacks two xml files.
I'm very confused.
What is the correct way to cteate a new project programmatically?
I am waiting for answers. Any suggestions will be highly appreciated!