Here is a preliminary illustration on how to use Git version control system with M3 Web Services Designer to manage changes to web services versions in multi-developer distributed projects. Since the M3 Web Services repository points to a folder of XML files it should be possible to use any revision control software like CVS, Subversion, Git, TFS, etc. Here I illustrate Git with some screenshots.
- Download and install Git from http://git-scm.com/
- I use the default options and Next > Next > … > Finish:
- Start Git GUI from the Windows Start menu:
M3 Web Service Repository
- Let’s suppose we have a remote M3 Web Service Repository at \\collaboration\MWS\Repository\ with our metadata files:
- And let’s suppose we want to manage those files in Git.
- For that, we’ll take that existing directory and import it into Git.
Create a Git Repository
- In Git GUI select Create New Repository:
- Enter the path to the web service repository, for example \\collaboration\MWS\Repository\ :
- Git GUI shows the files in the Unstaged state:
- Selection Edit > Options to identify ourselves:
- Enter your User Name and Email Address:
- Select Commit > Stage Changed Files To Commit (CTRL-I) to add a snapshot of the files to the staging area, and click Yes to confirm:
- The files are now in the Staged state:
- Enter an Initial Commit Message and select Commit:
- The files are now permanently committed and safely stored in the Git Repository:
- And the folder now contains a hidden .git folder:
Install EGit for Eclipse
- Let’s install EGit for Eclipse on one of the developer’s computer (you’ll repeat these steps for each developer in your team):
- Start MWS Designer and discard the web service repository location to avoid confusion for now:
- Select Help > Install New Software:
- Select the default Eclipse site, for example Kepler – http://download.eclipse.org/releases/kepler , filter for Git, and select Eclipse Git Team Provider:
- Click Next > Next > … > Finish and restart Eclipse for the changes to take effect.
- Select Window > Open Perspective > Other > Git Repository Exploring:
- It will switch to the Git Repository Exploring:
- Repeat the steps for each developer in your team.
Clone the Git Repository
Now we’ll clone the Git Repository to get a local copy of it:
- In the Git Repository Exploring, select Clone a Git repository.
- Enter the path to the remote Git Repository, for example: \\collaboration\MWS\Repository\ and click Next:
- Keep the default master branch and click Next:
- Select a local destination, for example C:\MWS\Repository\ and click Finish:
- EGit will show the Repository and the Working Directory:
- You now have a copy of the web service metadata files in your local directory with a hidden .git folder:
- In Eclipse, switch back to the MWS Designer perspective.
- Select New Repository Location and enter the cloned Git repository, for example: C:\MWS\Repository\ and click Finish:
- Your MWS Designer now has a local copy of the web services:
- Repeat for the other developers in your team.
That’s as far as I got for now.
After that I was able to create a branch and make changes. But I got an error when I tried to merge my changes; EGit seems to truncate the path to my shared folder and not recognize it anymore. I’ll explore more about it later.