Child pages
  • Setting up Eclipse IDE
Skip to end of metadata
Go to start of metadata

Eclipse is one of the favourite development environments among JAVA developers. At first glance setting up Eclipse to work with Sling is confusing so this article is  intended to help you get going with Sling development using Eclipse without pain.

Eclipse can be used to checkout code from the Sling repository and source build using maven. You can add new modules and re-build using maven inside Eclipse.

The tutorial describes how to setup the development environment for Eclipse version 3.3.2 (Europa). 

Here is how you work this magic.

Install Subclipse plug-in for Eclipse

To use subversion in eclipse you have to install the Subclipse plug-in using the following Eclipse update location,

Steps to install Subclipse plug-in,

    1.  In Eclipse IDE go to Help - > Software Updates - >  Find and Install.

    2.  Select "Search for new features to Install" and clickk next.

    3.  Click on the button "New Remote Site" in the window and enter a name ex: Subclipse and the URL specified above in the URL: field and click "OK".

    4.  The new name you specified will appear in the "Sites to include in search:" window select this and click finish.

    5.  In "Select  features to install" window select Subclipse and click "Finish" button. Deselect Mylin and Buckminister Integrations if "Finish" Button appears inactive.( I didn't find any use in the integrations and the "Finish" button was not active until I deselected them).

   6.   Agree to the licence agreement and proceed to install once Eclipse prompts you.

   7.   After installing you have to restart Eclipse. You can view repositories by going to Open Perspective - > Other - > SVN Repository Exploring.

Install Maven2 plugin for Eclipse

 To use the maven 2 plug-in you have to install the maven 2  plug-in using the following Eclipse update location,

    Please follow the steps 1 to 4 described in "Install Subclipse plug-in for Eclipse" section using the above URL.

    in Step 5 as before deselect Mylin Integration if "Finish" Button appears inactive.( I didn't find any use in the integrations and the "Finish" button was not active until I deselected them).

    Then agree to the licence agreement and proceed to install once Eclipse prompts you. Once you restart it's possible to use maven.

Creating a Maven 2 + Java  project.

 To checkout and edit or add new modules to Sling you have to first create a Java + Maven 2 project in eclipse. You must see a red "m" icon and blue "J" icon on the project directory.

 Follow these steps to create a Maven 2 + Java project.

    You should create the project in your workspace level for successful results. For some reason checkout fails if projects are nested in levels below workspace.  (This was the result I observed in my case)

   1. Go to File - > New - > Project and select Maven Project by expanding Maven folder in the "Select a wizard" menu and click next.

I had to check the box "Create a simple project (skip archetype selection)" on this screen. AndreasHartmann

   2. select the location to you want to checkout source from the repository. and click next.

   3. Click next in this screen and when you come to the next screen then set the following.

      Group Id : org.apache
      Artifact Id : Sling

      Click finish.

      This is a step where the IDE creates a pom.xml file for the new project using the details entered in Step 3.
      The values we enter here are not important because we will be replacing this pom.xml when we are checking out the source.

      The IDE insists that there should be values entered in this step or you will not be allowed to create the project. Therefore don't worry much about what you entered in Step 3 before clicking "Finish".

Checking Out Sling source to the new project.

 Follow these steps to checkout the sling source from Sling repository.

    1. Right click on the project and select "import".

    2. In the "Import" screen select "Other - > Checkout projects from SVN" and click next.

    3. Select create new repository in the "Checkout from SVN" screen and click next.

    4. In the URL: field enter the path to sling trunk which is and click next.

    5. Click "Finish" to checkout.

Building with maven plug-in

 First you have to download Maven 2 from and unzip it.

 Then follow these steps.

    1. Either  right click on  project go to  "Run  As  - > maven build"  or  select the green  play button and  click on "Open Run Dialog".

    2. In "Run" screen select "Main" tab and enter the directory of the project where you checked out the source , type "Install" as the goal and

        give the location to the unziped maven directory by browsing using "Configure - > Add" in the "Maven Runtime" field .

    3. Select  "JRE" tab and enter "-Xmx256M" into the "VM arguments" box to increase heap size.

    4.  Click  Apply  to save settings and  then Run to build.

    5. You can click console icon in the lower right corner to view progress.

    6. In order to run the launchpad after building change the base directory from the current location to the launchpad/webapp/ directory and change goal to "jetty:run"

        Click  Apply  to save settings and  then Run to build. Now you can run launchpad in yuor web browser after build completes.

Thats all you have to do to set up your Sling development environment in Eclipse IDE.




  • No labels

1 Comment

  1. Dongguan LingKang Wire & Cable CO.,Ltd.Was founded in 2009,it is professional in producing Tinsel Wire and Speaker Wire Manufacturer in China, has been specializing in designing and developing Medical Cable, Multimedia Cable and Acoustic Cable conductor more than 1000 types. We provide various Medical Cables conductor, such as ECG Cable, EKG Wire, EEG Wire and Flat Ribbon Cable, all with superior quality and competitive price.Customization service are available for Tinsel Wire, Speaker Lead Wire, Headphone Wire, Speaker wire, Enamel Wire,etc. All produced under management system of ISO9001 and ISO14001.All of materials in LingKang are 100% Green Materials compliant with European Union guidelines of RoHS.
    LingKang has a variety of modern mechanical equipment, such as: WORLD B.C rolling machine from Korean、Foil laminating machine from Japan and China、Coil winding machine、braiding machine 、Wire-Stranding machine、Back-twist machine and others. We have well-equipped facilities and excellent quality control throughout all stages of production enable to guarantee all customers’ satisfaction.
    In all the years, with its service concepts: “customer loyalty to the people, professional devotion to the people, in collaboration with a sincere and enthusiasm heart.” LingKang always work on the technological improvement and product innovation to satisfy the clients and fit for the competitive market. We already have lots of patented product design, in addition, we strive for perfection in product quality and customer service continues to expand the market all the time.
    We warmly welcome customers all around the world to visit our factory and build up the mutual, friendly cooperation relationship in the future. If you are interested in any of our products, please feel free to contact with