Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "SMILA/Documentation/HowTo/Howto set up dev environment"

(Checkstyle configuration)
m (Checkstyle configuration)
Line 78: Line 78:
  
 
You can solve this by importing them:  
 
You can solve this by importing them:  
* Open ''Window -> Preferences'' and go to ''Checkstyle''
+
# Open ''Window -> Preferences'' and go to ''Checkstyle''.
* Click ''New...'', enter <tt>SMILA Checkstyle</tt> as the name, click ''Import...'' and choose ''SMILA.builder/checkstyle/smila_checkstyle-5.xml'' from your workspace. Click ''OK''
+
# Click ''New...'', enter <tt>SMILA Checkstyle</tt> as the name, click ''Import...'', and select ''SMILA.builder/checkstyle/smila_checkstyle-5.xml'' from your workspace. Click ''OK''.
* Click ''New...'' again, enter <tt>SMILA Test Checkstyle</tt> as the name, click ''Import...'' and choose ''SMILA.builder/checkstyle/smila-test_checkstyle-5.xml'' from your workspace. Click ''OK''
+
# Click ''New...'' again, enter <tt>SMILA Test Checkstyle</tt> as the name, click ''Import...'', and select ''SMILA.builder/checkstyle/smila-test_checkstyle-5.xml'' from your workspace. Click ''OK''.
* Choose <tt>SMILA Checkstlye</tt> and click ''Set as Default''.
+
# Select <tt>SMILA Checkstlye</tt> and click ''Set as Default''.
* Click ''OK''
+
# Click ''OK''. <br> Now you should not get those error messages again.
Now you should not get those error messages again.
+
  
 
=== Launching SMILA in Eclipse IDE  ===
 
=== Launching SMILA in Eclipse IDE  ===

Revision as of 05:28, 8 February 2012


This HowTo describes the necessary steps for setting up a SMILA development environment.

Preconditions

Here is the list of things that you will definitely need for developing SMILA components:

  1. JDK 1.6
  2. Recent Eclipse SDK - This HowTo was tested with Eclipse Classic SDK 3.7.1 (Indigo SR1)
  3. Delta Pack - for some parts of the setup you are advised to add a "Delta Pack" to an Eclipse SDK installation. You can download it from the same page.

Getting the source code

There is more than one way of getting the code into your Eclipse workspace. In the next two sections, two recommended ways are shown. After having imported the source code into your workspace, it will show up a lot of errors. Don't worry, they'll disappear when you run through all steps of this HowTo.

Both methods described below will lead you to the same result: They will provide you with a workspace containing all core SMILA projects (plus SMILA.releng when you choose the Project Set File).

Getting the source code manually

Getting the source code manually without the Project Set File is the recommended practice, especially when you wish to update frequently.

Hint: We recommend to check out the trunk/core as opposed to importing the projects through IDE SVN integrations. By doing so, you can easily get new projects just by updating your working copy and reimporting the sources.
  • Import all SMILA project into your workspace:
    • Click File --> Import --> General --> Existing Projects into Workspace --> Next.
    • Select the folder that contains all SMILA projects --> (all projects should be selected automatically) --> Finish.
Using the Project Set File to get the source code

If you do not want to check out the source files manually, you can use the provided Project Set File (.psf) to check out and import all projects automatically.

  1. Install Subversive Team Provider and Subversive SVN JDT Ignore Extensions from the Eclipse software repository.
  2. Restart Eclipse.
  3. Select Windows > Preferences > SVN. This should open the Subversive Connector Discovery window.
  4. Select the Subversive SVN Connector that you wish to use. We suggest to take the latest SVN Kit that is offered. At the time of writing it was SVN Kit 1.3.5.
  5. Restart Eclipse.
  6. Download the file SMILA-core.psf.
  7. Select File --> Import --> Team --> Team Project Set --> Next.
  8. Click Browse and navigate to the .psf file.
  9. Click Finish.
    Now your IDE starts to download and import the SMILA projects. This will take quite a while.

Hint: When you want to reimport the .psf file (e.g. because there are new projects available in the SMILA core repository), you have to update the .psf file in the SMILA.releng project and import it (right click on it and click on "Import Project Set...", be sure to click "No To All" to the question whether to overwrite existing projects in the workspace, otherwise it will check out everything again instead of ignoring the projects, that are already checked out.

Enabling the BPEL Designer

If you want to work with the SMILA extensions for Eclipse BPEL designer, you need to check out the bundles from trunk/tooling. Currently, the required bundles are:

  • org.eclipse.smila.processing.designer.model
  • org.eclipse.smila.processing.designer.ui</tt>

To compile them you need additional bundles from the Eclipse BPEL Designer in your target platform. See SMILA/BPEL Designer for more information.

Defining the target platform

The target platform defines the set of bundles and features that you are developing against.

Defining the target platform the easy way

SMILA ships a Target Definition File that you can open in your IDE to configure the target platform automatically. This file contains all the references needed for developing SMILA with Eclipse Indigo SR1 (3.7.1):

  1. If the SMILA.releng project is not already contained in your workspace (e.g. because you have chosen the manual way to check out and import the source files), check out http://dev.eclipse.org/svnroot/rt/org.eclipse.smila/trunk/releng with your preferred SVN client and import the project into your workspace.
  2. Open the file SMILA.releng/devenv/SMILA-indigo-SR1.target with the Target Definition editor.
    Eclipse starts downloading the referenced bundles/features which it tells you by stating "Resolving Target Definition" in its status bar. Be patient, this will take quite a while. After it has finished, you can click the link "Set as Target Platform" on the top right of the Target Definition editor. Doing so will cause Eclipse to start re-compiling the sources and all error markers should be gone when finished.
Defining the target platform manually

Instead of using the target definition file you can also manually set your own target platform.

Checkstyle configuration

If you have the Eclipse Checkstyle plugin installed, you will get a lot of error messages complaining about missing check configurations when Eclipse builds the workspace.

Errors running builder 'Checkstyle Builder' on project 'org.eclipse.smila.utils'.
Fileset from project "org.eclipse.smila.utils" has no valid check configuration.
...

You can solve this by importing them:

  1. Open Window -> Preferences and go to Checkstyle.
  2. Click New..., enter SMILA Checkstyle as the name, click Import..., and select SMILA.builder/checkstyle/smila_checkstyle-5.xml from your workspace. Click OK.
  3. Click New... again, enter SMILA Test Checkstyle as the name, click Import..., and select SMILA.builder/checkstyle/smila-test_checkstyle-5.xml from your workspace. Click OK.
  4. Select SMILA Checkstlye and click Set as Default.
  5. Click OK.
    Now you should not get those error messages again.

Launching SMILA in Eclipse IDE

If you've checked out SMILA's trunk correctly, you should have a project called SMILA.launch in your workspace. This project contains the SMILA's launch configuration for Eclipse IDE. To start SMILA directly in your Eclipse IDE, just follow the steps below:

  1. Click Run--> Debug Configurations and expand OSGI Framework.
  2. Select the SMILA launch file.
  3. Make sure that there aren't any junit 4 bundles activated:
    • Enter "junit" into the filter text field.
    • Uncheck all junit 4 bundles (e.g. org.junit4, org.junit(4.8.2....) etc.) because they conflict with the junit 3 bundles used in SMILA.
  4. Click Debug.
    If everything works fine, you will get an output in the Console view similar to the following:
osgi> Persistence bundle starting...
ProviderTracker: New service detected...
ProviderTracker: Added service org.eclipse.persistence.jpa.osgi.PersistenceProviderOSGi
Persistence bundle started.
[INFO ] Context /zookeeper: Registered handler(1) ZooKeeperAdminHandler, pattern /(.*)$
[INFO ] Added worker webFetcher to WorkerManager.
...
[INFO ] HTTP server has SMILA handler RequestDispatcher for context /smila.
[INFO ] HTTP server started successfully on port 8080.

You're done

Congratulations! You've just successfully checked out and configured your SMILA development environment and you can now start developing your own bundles.

Back to the top