
Build Liferay IDE From Source using github
Table of Contents [-]
Liferay IDE Developing from source using Github
In this article we will see how to build the Liferay IDE from source using the github as source control repository. You can refer to the previous article on the same subject at link to build liferay from source
Overview #
In this article we will see how to build the Liferay IDE from source using the github as source control repository. You can refer to the previous article on the same subject at Build Liferay IDE From Source
Liferay IDE sources are now moved to github and is available at Liferay IDE Source and its now using Eclipse Tycho for project and plugins build
Getting started #
We need the following to enable us to build and contribute to the Liferay IDE
- An github.com account
- Eclipse Indigo
- We need to install the following plugins on top of eclipse which will allow us to build the plugins
- Liferay Portal 6.0.GA4, for testing and Liferay Portal dependencies required by the plugins
Lets see each and every point mentioned above in detail
GitHub Account #
As mentioned above the Liferay IDE has now moved to the github, so we need to create an github account and set it up our working repository. This is what we need to do for that,
- Go to github.com and create an account.
After creation of the account login to your account, on the dashboard you will see the following,
- Follow the "Setup Git " link on your dashboard screen to setup the git in your system
- Follow the "Fork a Repository" link to fork the existing http://github.com/liferay/liferay-ide project to your local repository
- Then navigate to your local repository folder e.g. C:\liferay\git\, if you dont have one then create it
- From the folder issue the following commands,
- git clone git@github.com:<<your github user name>>/liferay-ide.git
- git remote add upstream git://github.com/liferay/liferay-ide.git
- git fetch upstream
- Now you are done with setting up of the local liferay-ide git repository, you now use this repository for all your local updates, fixes and changes and commit them
- The next section will explain on how to import the above local liferay-ide repository in your Eclipse
Eclipse Setup #
- You can read the Build Liferay IDE From Source on how to setup the Eclipse IDE for building the Liferay IDE sources.
- Once you have setup the Eclipse Development environment , EGit is by default available with Eclipse Indigo, if you are using earlier verisons of Eclipse you can download and install Egit plugin as follows,
Add Site
Select features
Follow the Eclipse wizard and complete the plugin installation and restart Eclipse
Once Eclipse is restarted you can add a new View called "Git Repositories" to your perespective, once added you should see a view something like below,
Now we can import our github which we have cloned in "Getting started" section, to do that click on the button In the Git Repositories view, you will be shown a import wizard like the one below,
and once you press OK your local repository will be imported in to eclipse and your Git Repositories view will look like the one below
Now you can right click the "liferay-ide" repository name you see in the view and do "Import projects" this will import all the Liferay IDE plugins project in to the Eclipse and you should see the projects in Eclipse as shown below,
- Import the "Liferay_IDE_Formatter_Prefs.xml" form your local Git repository as your Java Formatter preferences
- You also need to install Sapphire plugin to your eclipse installations as some of the plugin projects requires this dependency
- You also need to create a Java User Library called "Liferay Portal" as some of the builds will fail because of this dependency, please download the
and import the same into your eclipse, be sure to update the paths of Liferay installation. You can refer to How to Add Java User Library to know how to add Java user library
Thats it we are done with our environment setup for Liferay IDE development with github,
Contributing #
you can now do the development on your local repository and commit, always create a new branch usually the Liferay ISSUE id when you are cotributing and commit your changes to the branch, once you have done the commits you can issue the following commands to push you branch to your github repository
- git pull --rebase upstream
- git push origin <branch name>
- Go to github, switch to your <branch name> , and then select "Pull request"
- By defualt it wants to send the pull request to liferay/liferay-ide, but since Gerg Amerson will be the one that reviews your contribution you need to send the pull request to him (switch it on the drop down on the left hand side) gamerson/liferay-ide Then that will send me the pull release
Then Greg Amerson can review your contributions and merge the code with main stream and or provide comments or updates