CHAPTER 33

image

Working in Heterogeneous Environments

Organizations develop software using different environments: Some applications or components are built in Java and some in .NET. One of our current customers has to support its platform on both Windows and Mac OSX (a Java version of the Windows application). This means that the customer uses both Visual Studio and Eclipse for development.

Working in heterogeneous environments presents difficulties. For instance, how can we share our work items between the development environments? How can we share reports and statistics about the progress of our projects when working in different development environments? Sure, we can use web access, but switching context from the development environment to the web access costs time. It would be better if we could access the work items and reports directly from within the development environment, just as we do in Visual Studio.

Having most information about source control, builds, work items, and so on in a single repository would greatly improve the ALM process in a heterogeneous environment. This would also enable us to get rid of some applications that were used for supporting one platform only, hence cutting down on maintenance costs. Let’s face it, having two source control environments just because we have two development environments costs time and money to support and maintain. It’s simpler and more cost effective to use only one.

What is Team Explorer Everywhere?

Team Explorer Everywhere (TEE) can help us with problems we might encounter in a heterogeneous environment. TEE enables us to access most features of TFS inside our Eclipse environment, no matter if we use Windows or Mac as a development platform. The authors use it for accessing TFS from inside Eclipse on Mac OSX and it works great.

Originally a company called Teamprise developed TEE. On November 9, 2009, Microsoft announced that it had acquired Teamprise and that its plug-in for Eclipse would be developed as a Microsoft product. The result is what we now call Team Explorer Everywhere.

TEE gives us a single repository for source control, work-item tracking, reports, statistics and information, and much more. This greatly improves the ALM process and cuts down on the need for maintaining several systems supporting our different development environments.

A Little Bit about Licensing

In March 2012. Brian Harry announced (http://blogs.msdn.com/b/bharry/archive/2012/03/08/even-better-access-to-team-foundation-server.aspx) that before March 8 2012, Team Explorer Everywhere users had to purchase both a Client Access License (CAL) and the Team Explorer Everywhere software. Visual Studio Team Explorer users only had to purchase a CAL, since the Visual Studio Team Explorer software always had been a free download for users who had a license to access a TFS server. As of March 8, 2012, it is the same for Team Explorer Everywhere. We only need a CAL to TFS in order to use TEE. These are great news for organizations with a mixed development environment.

According to Harry, this change means that now that Microsoft has eliminated the licensing of TEE, it can finally set up a standard Eclipse update site that will enable us to keep Team Explorer Everywhere up to date, just as we do the rest of our Eclipse extensions.

Other exciting scenarios, according to Harry, are:

  • No matter if we use Visual Studio-based Team Explorer or the Eclipse-based Team Explorer Everywhere, we can access TFS without any extra cost besides the CAL.
  • If we use Team Foundation Server “Standard Edition,” we use either the Visual Studio-based Team Explorer or the Eclipse-based Team Explorer Everywhere with no additional purchases.
  • Team Foundation Server Express enables a team of up to five people to experience much of the power of TFS for free. We can now use TFS Express along with Team Explorer and/or Team Explorer Everywhere all for no charge.

For some organizations, these are really great advantages, especially for those that have not already integrated their Eclipse environment into TFS. Now they don’t need to purchase TEE separately.

Features Available in Team Explorer Everywhere

Most features of TFS are available to Eclipse users through TEE (http://msdn.microsoft.com/en-us/library/gg413271.aspx). These include team projects, version control, team builds, and project management (including work item features). Some features, however—such as the ability to create team projects and set permissions—are not available from the Team Foundation Server plug-in for Eclipse. For those features, we must use Team Explorer in Visual Studio. We can live with these limitations, but it would be great if these were included as well.

Reports are not available inside TEE, so we need to use web access for these.

There is even a cross-platform command-line utility available for those of us who like and use the command prompt for our work. This utility works on UNIX and Linux as well, extending the use of TFS in heterogeneous environments.

Installation in Eclipse

Follow these steps (http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=28983) to install Team Explorer Anywhere in your Eclipse environment on Mac OSX (the same steps apply to a Windows Eclipse version).

Open Eclipse. On the Help menu, click Install New Software (Figure 33-1) and the Install dialog box appears.

9781430243441_Fig33-01.jpg

Figure 33-1.  Installing new software in Eclipse

  • Click Add (Figure 33-2) and the Add Site dialog box appears.
  • In Name, type Local Team Explorer plug-in archive.
  • Click Archive.
  • Specify the location of the archive file (TFSEclipsePlugin-UpdateSiteArchive-11.0.0-Beta.zip) and click Open.

9781430243441_Fig33-02.jpg

Figure 33-2.  The install dialog opens

Click OK. In the list of features in the Install dialog box (Figure 33-3), select the check box that corresponds to Team Explorer Everywhere. Double-click Next.

9781430243441_Fig33-03.jpg

Figure 33-3.  Select Team Foundation Server plug-in for Eclipse

If you agree to the Microsoft Software License Terms, Accept them and then click Next.

You must restart Eclipse when prompted (Figure 33-4).

9781430243441_Fig33-04.jpg

Figure 33-4.  Restart Eclipse after installation

Connect to TFS

When Team Explorer Everywhere is installed and Eclipse is restarted, it is time to connect to a TFS server.

From within a Java project, right click the project and select Team/Share Project, which creates a connection to a TFS server.

9781430243441_Fig33-05.jpg

Figure 33-5.  Connecting to TFS from Eclipse

In the next screen (Figure 33-6), you select which repository you want to use to share your project. Select Team Foundation Server and click Next.

image Note  Sharing your project only means that you want to store your code in a source control repository. To access the features of Team Explorer Everywhere, you need to perform these actions.

9781430243441_Fig33-06.jpg

Figure 33-6.  Select Team Foundation Server

Before you can continue, review and agree to the license agreement and then enter the address to the Team Foundation Server (Figure 33-7).

9781430243441_Fig33-07.jpg

Figure 33-7.  Enter the name or URl of the TFS server

After pressing OK, you will be presented with the login screen to the Team Foundation Server. When you are done signing in, press Close (Figure 33-8).

9781430243441_Fig33-08.jpg

Figure 33-8.  Close the dialog box

You are now presented with a form for selecting a TFS collection and one or more Team Projects (Figure 33-9).

9781430243441_Fig33-09.jpg

Figure 33-9.  Select a TFS Collection and one or more Team Projects

Next we select which workspace we want to use for our project. Add one of your own or edit the default if you want to change anything (Figure 33-10).

9781430243441_Fig33-10.jpg

Figure 33-10.  Select a workspace

Select which Team Project you want to use for storing your source code (Figure 33-11) and select Next.

9781430243441_Fig33-11.jpg

Figure 33-11.  Select where to share your Java project

If you are happy with the changes, click on Finish to add your Java project to TFS.

Using TEE from Eclipse

Once TEE is installed, we can access it from within Eclipse (Figure 33-12). Let us start by checking in the source code we began this section with.

9781430243441_Fig33-12.jpg

Figure 33-12.  Source Control options in Eclipse using TE

From the Pending changes menu, select Check In. This will trigger the check-in process, and we will have the same rules and policies available to us in TEE as we would in a Visual Studio environment. This means we can enforce the policies we need our developers to comply with in a cross-platform environment. Confirm the check-in by clicking Yes in Figure 33-13.

We can also see that we have several more options in our Team menu after installing TEE (Figure 33-14).

9781430243441_Fig33-13.jpg

Figure 33-13.  Review the pending changes and select Yes

But where is Team Explorer itself? Team Explorer does not show by default. You need to go to Window, Show View, Other . . . , and select Team Explorer from the next form.

9781430243441_Fig33-14.jpg

Figure 33-14.  New options are available from the Team menu

Now you will have Team Explorer inside Eclipse just as you would in Visual Studio (Figure 33-15), and you can access work items, builds, and more.

9781430243441_Fig33-15.jpg

Figure 33-15.  Team Explorer from within Eclipse

Click on Work Items to access the work item queries. In Figure 33-16, we can see all work items returned by the All Work query.

9781430243441_Fig33-16.jpg

Figure 33-16.  We can reach our Work Item Queries inside TEE just as in Visual Studio Team Explorer

We can open a work item from inside Eclipse, and it looks just like it does in Visual Studio (Figure 33-17). We have the same layout, the same tabs, and the same information.

9781430243441_Fig33-17.jpg

Figure 33-17.  Viewing a work item from inside Eclipse on Mac OSX

In TEE, we can access some important settings for our projects (see Figure 33-18), such as project security, areas and iterations, and check-in policies.

9781430243441_Fig33-18.jpg

Figure 33-18.  The project settings in TTE in Eclipse

All in all, we can access the most important features of TFS from within our Eclipse environment. If we want access to reports, however, we must go to the web-access page for the project.

Ant and Maven 2 Build Improvements

Previously there was not support for Ant or Maven 2 builds in TEE and TFS, making the ALM process a bit flawed. Microsoft has now changed this. The Team Foundation Build Extensions (http://visualstudiogallery.msdn.microsoft.com/3e3b3492-d78a-4829-9657-fc1cadba4ccb) provide the ability to execute Ant or Maven 2 builds from Team Foundation Server 2012 and publish the results of the build along with any associated JUnit test results back to Team Foundation Server. This very useful feature makes visibility and traceability in a heterogeneous environment much better, helping us improve an ALM process in mixed-development organizations.

Once we have installed the build extensions on the necessary build-agent machines, we must create a build definition that makes use of them. The easiest way to do this is to use Team Explorer Everywhere 2012 to create the build definition. We will not go into the specifics in this chapter; please check out the section on Releasing in Chapter 26.

When communicating with Team Foundation Server 2012, an MSBuild-based Ant or Maven build definition will make use of the UpgradeTemplate workflow process to execute a TFSBuild.proj script that actually calls Ant or Maven. This allows the entire process to be easily edited from Eclipse or from the command line.

Please note that these extensions will not work with earlier versions of TFS, but you can find extensions for TFS 2005–2010 at http://visualstudiogallery.msdn.microsoft.com/2d7c8577-54b8-47ce-82a5-8649f579dcb6.

Summary

In this chapter, we looked at Team Explorer Everywhere, a Microsoft product that enables us to access the features of TFS from inside our Eclipse environment in either Windows or OSX and hence allows us to include our Java developers into our TFS ALM solution. This is useful for organizations with a mixed-development environment.

In the next chapter we look at Team Foundation Services, an implementation of TFS in the cloud.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.219.96.188