One of the cool things about using Team Foundation Server is the fact that it’s not technology bounded. What I mean about that, is the fact that you’re not tight to Visual Studio as IDE and that TFS can also be used to build non-microsoft solutions like Java. In this blogpost, I would like to describe how you can use Eclipse to manage your TFS environment.
Last year, Microsoft released a plug-in for Eclipse, originally called TeamPrise but now it’s ‘Team Explorer Everywhere‘ (TEE). Using this plug-in you have access to TFS 2010 from Eclipse, which is a very popular IDE. Projects using Java/PHP/.. can now also leverage the benefits like workitem tracking, source control, build automation, reporting and web-portals.
This is a quick overview of how to install TEE. First of all, I will use Eclipe on a Ubuntu environment (just to show that it also work on Linux machine). I downloaded the latest Ubuntu release (which is really cool, btw) and created a Virtual Machine to install Ubuntu. After installation of the OS, you get this nice welcome screen:
Next step is to install Eclipse. Very simple, just download the Eclipse (3.7-Indigo) environment you want (for Java, classic, PHP). In linux, this will be a tar.gz and in Windows a normal .zip file. All you have to do after downloading is unzip/untar the file and put it in C:/eclipse or /home/.. (whatever you want). The next thing that you have to check is that you have a JRE/JDK installed. (download on oracle.com). Now it’s time to run Eclipse:
The next thing we want to do is install TEE SP1 (SP1 is a full package, there is no need for the non SP1 version).You can download the connector using your MSDN subscription, or using the public download url. You can download all 3 files, but actually you only need the file TFSEclipsePlugin-UpdateSiteArchive-10.1.0.zip. When the download is finished, go to Eclipse and select ‘Help -> Install New Software’. This opens a dialog where you can install additional plugins/connectors.
Click on the ‘Add..’ button to add a new repository. Enter a name, like ‘TFS connector’ and click ‘Archive’ to select the downloaded zip file. Select the new item you’ve just downloaded and click next. Follow the wizard, accept the license and click on the ‘Restart Now’ button.
When Eclipse is restarted, you don’t see many changes. The TFS related windows are more or less hidden by default. You can show them by selecting ‘Window -> Show View -> Other -> Team Foundation Server‘. There you can select the windows you want.
Now we have TEE installed in Eclipse, we can start using it. Create new project and add some awesome codefiles to it (yes I use PHP in my examples :$). If you did that, we can add the project to our Team Foundation Server. Right-click on your project and select ‘Team -> Share Project‘. There you get a dialog asking you for the TFS settings (Url & credentials). Supply them correctly and click Next.
Note: If you use Active Directory to connect, enter the correct domain and complete the username with your windows username. Also be aware that if you check ‘Save password’, the password will be saved in plain text on your system!
Then you get a list with your team projects, select the team project you need and click Next. In the list you see now, click the Team Foundation Server workspace to which your project will be connected, and then click Next. (You can offcourse also change the default values from your workpace). The last step is to select the folder for you shared projects (the project folder path). Click Next. In the last dialog, you have an overview of your selected settings, and now just click Finish
Now that the project is added, we can do a check-in using the ‘pending changes’ window. If you look there you will see that all files associated with your project are marked as ‘add’. Now add some comments and click ‘Check In‘.
If you return to Visual Studio, and do a ‘Get latest version ‘ on your project, you should see your files from your Eclips project.
Ok, so now we can do (allmost) all things we can do with the ‘normal’ Visual Studio Team Explorer. We have our team explorer, we can manage our sourcecontrol, manage our build, our workitems, merge files on update conflicts,… The only restriction I found was that there is no possibility to use the braching/merging actions/overview like you can in the regular TE. Other than that, I think it’s quite similar to the Team Explorer from Visual Studio. Some screenshots:
This was an overview about how to install TEE on Eclipse. In a next blogpost, I’ll cover how you can build a JAVA project using ANT/MAVEN with the TFS buildserver (using the Microsoft Team Foundation Server 2010 Build Extensions). Stay tuned!