DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
  1. DZone
  2. Coding
  3. Tools
  4. MuleSoft: Encouraging Teamwork to Enhance Productivity

MuleSoft: Encouraging Teamwork to Enhance Productivity

This article will explain how to install the EGit plugin for Anypoint Studio and use it during project development.

Sulthony H user avatar by
Sulthony H
·
Jun. 08, 16 · Tutorial
Like (4)
Save
Tweet
Share
15.65K Views

Join the DZone community and get the full member experience.

Join For Free

For a simple integration project, a developer can configure the project on its own machine and then deploy it to server once it is finished. However, like other software development activities, integration projects may be not as simple as that. It can be complicated and requires collaboration from many developers. They might be working with the same resources, which probably leads to confusion or conflict.

Actually, there is no doubt that every developer is aware of this issue. And obviously, they will implement version control. So everyone can work together focusing on their own task and then merge the changes to the same resources. There are many options to do this. One of popular version control system is Git. an open-source version control system that is widely used for software development.

The thing is: Anypoint Studio does not have Git support out of the box!

Therefore, to enable our team members to work together using Git in Anypoint Studio, we have to install an EGit plugin. This article will explain how to install the EGit plugin for Anypoint Studio and use it during project development.

EGit Plugin for Anypoint Studio

  1. Open Anypoint Studio and go to Help >> Install New Software…
  2. Click the Add… button, and then enter the following information:
  3. Name = EGit Install Site
    Location = http://download.eclipse.org/egit/updates

    Image title

  4. If you have any problem with the URL, then download it first from http://www.eclipse.org/egit/download/ to a local folder and change the Location above with the downloaded file address.
  5. After clicking the OK button, then the value of “Work with…” will be updated. Eventually the relevant plugins available from the URL which we just entered will be showed.
  6. Click Select All button.
  7. Expand the first plugin: Eclipse Git Team Provider.
  8. Uncheck/deselect the “Eclipse Git Team Provider - Task focused interface” option.
  9. Image title

  10. Click the Next button. Eclipse then shall check the URL and the requirements needed for installation.
  11. Then just follow the installation instruction, e.g.: click Next button.
  12. Click “I accept the terms…” on the license agreement.
  13. Click the Finish button. Then Eclipse will install the plugin.

Upon completing the installation, Anypoint Studio will require a restart. After that add another perspective by the following steps:

  1. Go to Window >> Perspective >> Open Perspective >> Other…
  2. Or click Open Perspective button on the top of right Anypoint Studio.
  3. Image title

  4. Select Git and then click OK button.
  5. A perspective button will appear:
  6. Image title

  7. By clicking it we will be able to manage Git repository within Anypoint Studio.
  8. Image title

Setup Git Project

There are several ways to setup Git project, such as Import or Clone a Git repository. Both of them are accommodated by Anypoint Studio. In this article, we use the first option (use Import). Later we will see its association with Git Repositories perspective above:

  1. File >> Import
  2. Inside the Import window expand Git.
  3. Select Project from Git, and click Next button to move to the next step.
  4. Select Clone URI.
  5. Fill all required fields, or just put the correct URI then other fields will be automatically populated.
  6. Select the preferred Branches.
  7. Set the Destination Directory.
  8. Select the wizard to import the project: Import using the New Project wizard.

After the Finish button is clicked, a new window will be displayed. Now we have to configure the new project which will be imported:

  1. Expand Mule, select Mule Project, and then click Next button to move to the next step.
  2. Fill the Project Name.
  3. Uncheck/deselect Use default location option.
  4. Fill the Location (type it directly or click Browse button) with the value of Destination Directory (step #7 above).
  5. Click Finish button.

A new Mule project will be imported and displayed in Package Explorer. Also the new Git repository will be listed in Git Repositories perspective. The same result when we choose the second option: Clone a Git Repository.

Image title

By installing EGit plugin, we can easily execute any Git actions. The suggested actions will be provided based on the selected resources: project, folder, or file. Right click and choose Team menu on resources, alternately to see the different options.

Image title

Switch Branch

For some reason a project might be consist of some branches. To switch from one branch to another one: right click on the project name, choose Team >> Switch To… >> and select the branch name. In case there are too many branches then select Team >> Switch To… >> Other …

Manage the Changes

Any file modification will be tracked and marked. There are three common marks that are used to notify developers when they modify the code. Each mark represents different meaning:

  • ? = represent an untracked file, which is not under Git version control yet
  • + = new file
  • > = modified file

To follow up those changes there are many Git actions that can be chosen, such as: fetch, pull, commit, or push. These actions are also provided after right click >> Team.

Compare the Contents

To make sure that current modification fits the requirement and it does not break current implementation, we can compare with its original one. For another purpose, we might need to compare our recent changes among last commit, the index, or the current working tree. To confirm it, select the resources and right click >> Compare With.

Image title

Rather than evaluate the contents, we also able to see each resource’s changes history. A comments or notes of modification which recorded every time it is committed. The History View can be displayed by right click >> Team >> Show in History.

Image title

Revert the Changes

Due to some circumstances we need to revert back to a previous version. Instead of rewriting the latest code, we can easily go back to the previous one. Still similar as other actions, select the resources and right click >> Replace With: Head, Index, Previous Revision, etc.

That is few examples on how to use EGit plugin in Anypoint Studio. Please feel free to explore other features and other Git action options.

Credits:

Gama Ogi Prayogo for his guidance via internal company blog: How to install EGit plugin

Git Productivity MuleSoft

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • RabbitMQ vs. Memphis.dev
  • PHP vs React
  • Building a Scalable Search Architecture
  • Top 5 Node.js REST API Frameworks

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: