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"

m
(45 intermediate revisions by 5 users not shown)
Line 1: Line 1:
[[Category:SMILA]]
+
<br> This HowTo describes the necessary steps for setting up a SMILA development environment.  
 
+
This HowTo describes the necessary steps for setting up a SMILA development environment.
+
  
 
==== Preconditions  ====
 
==== Preconditions  ====
  
Here is the list of things that you will definitely need for developing SMILA components:
+
Here is the list of things that you will definitely need for developing SMILA components:  
  
# JDK 1.6
+
* JDK 1.7
# Recent Eclipse SDK - This HowTo was tested with [http://download.eclipse.org/eclipse/downloads/drops/R-3.7.1-201109091335/index.php Eclipse Classic SDK 3.7.1] (Indigo SR1) <br/>
+
* Recent Eclipse SDK - This HowTo was tested with [http://download.eclipse.org/eclipse/downloads/drops4/R-4.2-201206081400/ Eclipse Classic SDK 4.2] (Juno Release) <br>  
  
==== Getting the source code ====
+
==== 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.  
+
There is more than one way of getting the code into your Eclipse workspace. The following sections will describe how to get the source code via SVN (recommended!).  
  
Both methods descibed below will lead you to the same result: They will provide you with a workspace containing all core SMILA projects (plus <tt>SMILA.releng</tt> when you choose the ''Project Set File'').  
+
As an alternative, you could download the complete source code from the [http://www.eclipse.org/smila/downloads.php release download page] or the [http://build.eclipse.org/rt/smila/nightly/ nightly build downloads] and unpack the archive into your workspace.  
  
===== Getting the source code manually  =====
+
===== Installing SVN Provider =====
 +
''(skip this section if SVN Team Provider is already installed in your eclipse IDE)''
  
Getting the source code manually without the ''Project Set File'' is the recommended practice, especially when you wish to update frequently.  
+
* Install ''Subversive SVN Team Provider'' and ''Subversive SVN JDT Ignore Extensions'' from the Eclipse software repository.<br>
 +
* Restart Eclipse.
 +
* Select ''Windows &gt; Preferences &gt; Team &gt; SVN''. This should open the ''Subversive Connector Discovery'' window.
 +
* 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.  
  
#Use your favorite SVN client to check out SMILA's source code from the repository located at:<br> <tt>http://dev.eclipse.org/svnroot/rt/org.eclipse.smila/trunk/core</tt> <br> '''Hint:''' ''We recommend to check out the {{code|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.''
+
===== Get source code from SVN =====
#After having checked out the source code, import it into your workspace:
+
#*Click ''File'' --&gt; ''Import'' --&gt; ''General'' --&gt; ''Existing Projects into Workspace'' --&gt; ''Next''
+
#*Select the root folder of the local trunk --&gt; (all projects should be selected automatically) --&gt; Finish
+
  
===== Using the Project Set File to get the source code  =====
+
There are two ways for this, automatically by using the ''Project Set File'' or manually. Both are described in the following:
  
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.  
+
''manually checking out and importing the projects:''
 +
* Use your favorite SVN client to check out SMILA's source code from the repository located at:<br> <tt>https://dev.eclipse.org/svnroot/rt/org.eclipse.smila/trunk/core</tt>. If you later want to be able to build a SMILA distribution, all SMILA projects should be located in the same directory.
 +
::'''Hint:''' ''We recommend to check out the {{code|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'' &gt; ''Import'' &gt; ''General'' &gt; ''Existing Projects into Workspace'' &gt; ''Next.''
 +
** Select the folder that contains all SMILA projects --&gt; (all projects should be selected automatically) &gt; ''Finish''.
  
You have to install a subversion team provider in your eclipse IDE in order to use the ''Project Set File''. We recommend to install the ''Subversive Team Provider'' from the eclipse software repository (you should also install ''SVN JDT Ignore Extensions'').  
+
''automatic checkout and import by using the Project Set File:''
 +
* In eclipse, create an SVN repository location with URL <tt>https://dev.eclipse.org/svnroot/rt/org.eclipse.smila</tt>
 +
* Checkout <tt>trunk/releng</tt>
 +
* Right click on <tt>SMILA.releng/devenv.SMILA-core.psf</tt>
 +
* Click ''Import Project Set...'' and choose "No To All"
 +
::'''Hint:''': ''New projects should always be added to the .psf file so you can import them (as before): right click on .psf file 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. If projects are removed you have to remove them manually from the workspace, this can't be handled via .psf file.''
  
Before you can use the ''Subversive Team Provider'' you will have to select the SVN connector to use (we suggest that you should take the latest SVN Kit that the Subversive Connector Discovery offers).
+
After having imported the source code into your workspace, it will show up a lot of errors. Don't worry, they'll disappear after the next steps below.
 
+
#Download the [https://dev.eclipse.org/svnroot/rt/org.eclipse.smila/trunk/releng/devenv/SMILA-core.psf SMILA-core.psf] file.
+
#Select ''File'' --&gt; ''Import'' --&gt; ''Team'' --&gt; ''Team Project Set''.
+
#Enter the location of the <tt>.psf</tt> file.
+
#Click Finish.<br>Now your IDE starts to download and import the SMILA projects. This will take a while.
+
 
+
'''Hint:''' ''When you want to reimport the psf (e.g. because there are new projects available in the SMILA core repository), you have to update the psf 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  =====
+
 
+
{{note|
+
If you want to work with the SMILA extensions for Eclipse BPEL designer, you need to checkout the bundles from <tt>trunk/tooling</tt>. Currently these are:
+
* org.eclipse.smila.processing.designer.model
+
* org.eclipse.smila.processing.designer.ui
+
To compile these you need bundles from the [http://www.eclipse.org/bpel Eclipse BPEL Designer] in your target platform. See [[SMILA/BPEL_Designer]] for more information on these bundles.
+
}}
+
  
 
==== Defining the target platform  ====
 
==== Defining the target platform  ====
  
The target platform defines the set of bundles and features that you are developing against.  
+
The target platform defines the set of bundles and features that you are developing against. 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 Juno (Release 4.2).
  
===== Defining the target platform the easy way =====
+
===== Using the target platform provided by SMILA =====
  
SMILA ships a target definition file at http://dev.eclipse.org/svnroot/rt/org.eclipse.smila/trunk/releng/devenv/SMILA-indigo-SR1.target that you can open in your IDE (after downloading it and importing the releng project; if you downloaded the source code using the Project Set File you will already have the SMILA.releng project containing the target definition in your workspace).
+
* Checkout <tt>../org.eclipse.smila/trunk/releng</tt>  (''if you haven't already done before'')
 +
* Open the file <tt>SMILA.releng/devenv/SMILA.target</tt> with the ''Target Definition'' editor. <br>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.
  
This file contains all the references needed for developing SMILA with Eclipse Indigo SR1 (3.7.1). After opening it, eclipse starts to download the referenced bundles/features which it tells you by stating "resolving target platform" in the status bar. This takes a good while. After it is done you can hit the link "Set as Target Platform" on the top left of the editor. Doing so will cause eclipse to start re-compiling the sources and all error markers should be gone.
+
===== Defining the target platform manually  =====
  
===== Defining the target platform manually =====
+
* Instead of using the target definition file provided by SMILA (see above) you can also [[SMILA/Development Guidelines/Howto set up target platform|manually set your own target platform]].
  
Instead of using the target definition file you can also [[SMILA/Development Guidelines/Howto set up target platform|manually set your own target platform]].
+
==== Launching SMILA in Eclipse IDE  ====
  
==== Launch 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:
 +
 
 +
* Click <span style="font-style: italic;">Run</span>--&gt; ''Debug Configurations'' and expand '''''OSGI Framework'''''<b>.</b>
 +
* Select the ''SMILA'' launch file.
 +
* Click '''Debug'''. <br> If everything works fine, you will get an output in the '''Console''' view similar to the following:
  
If you've checked out SMILA's trunk correctly, than 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:
 
::* Click '''Debug''' --> '''Debug Configurations''' and expand '''OSGI Framework'''
 
::* Select '''SMILA''' launch file
 
::* Check if no junit 4 bundles are activated:
 
::** enter junit in the filter of the '''Bundles'''
 
::** uncheck all junit 4 bundles, if they are checked (e.g. org.junit4, org.junit(4.8.2....) etc.) since they conflict with the junit 3 bundles used in SMILA.
 
::* press '''Debug'''
 
:: <br/>
 
::* If everything is started correctly, you will get an output in the '''Console''' view like below:
 
 
<source lang="text">
 
<source lang="text">
 
osgi> Persistence bundle starting...
 
osgi> Persistence bundle starting...
Line 81: Line 70:
 
[INFO ] Context /zookeeper: Registered handler(1) ZooKeeperAdminHandler, pattern /(.*)$
 
[INFO ] Context /zookeeper: Registered handler(1) ZooKeeperAdminHandler, pattern /(.*)$
 
[INFO ] Added worker webFetcher to WorkerManager.
 
[INFO ] Added worker webFetcher to WorkerManager.
 
 
...
 
...
 
 
[INFO ] HTTP server has SMILA handler RequestDispatcher for context /smila.
 
[INFO ] HTTP server has SMILA handler RequestDispatcher for context /smila.
 
[INFO ] HTTP server started successfully on port 8080.
 
[INFO ] HTTP server started successfully on port 8080.
 
</source>
 
</source>
  
==== You're done ====
+
==== You're done ====
Congratulations! You've just successfully checked out and configured your SMILA development environment and can now start developing your own bundles.
+
 
 +
Congratulations! You've just successfully checked out and configured your SMILA development environment and you can now start [[SMILA/Development Guidelines/Create a bundle (plug-in)|developing your own bundles]].
 +
 
 +
==== Additional steps ====
 +
 
 +
The following steps may be needed for special purposes. If you are a SMILA user who only wants to integrate an own component you won't need them. 
 +
 
 +
===== Delta Pack =====
 +
''(only needed for building the software outside of eclipse IDE)''
 +
 
 +
For building the software you may need to add a "Delta Pack" to an Eclipse SDK installation. You can download it from the [http://download.eclipse.org/eclipse/downloads/drops4/R-4.2-201206081400/ here]. After downloading, you can copy the contained plugins and features in your eclipse installation.
 +
 
 +
===== Checkstyle configuration =====
 +
 
 +
If you have the [http://eclipse-cs.sourceforge.net/ Eclipse Checkstyle plugin] installed, you will get a lot of error messages complaining about missing check configurations when Eclipse builds the workspace.
 +
(''Hint: For installing the Checkstyle plugin, use location: "http://eclipse-cs.sf.net/update/"'')
 +
 
 +
<source lang="text">
 +
Errors running builder 'Checkstyle Builder' on project 'org.eclipse.smila.utils'.
 +
Fileset from project "org.eclipse.smila.utils" has no valid check configuration.
 +
...
 +
</source>
 +
 
 +
You can solve this by importing them:
 +
* Open ''Window -> Preferences'' and go to ''Checkstyle''.
 +
* 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 select ''SMILA.builder/checkstyle/smila-test_checkstyle-5.xml'' from your workspace. Click ''OK''.
 +
* Select <tt>SMILA Checkstyle</tt> and click ''Set as Default''.
 +
* Click ''OK''. <br> Now you should not get those error messages again.
 +
 
 +
===== 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 <tt>trunk/tooling</tt>. Currently, the required bundles are:
 +
 
 +
*<tt>org.eclipse.smila.processing.designer.model</tt>
 +
*<tt>org.eclipse.smila.processing.designer.ui</tt>
 +
 
 +
To compile them you need additional bundles from the [http://www.eclipse.org/bpel Eclipse BPEL Designer] in your target platform. See [[SMILA/BPEL Designer]] for more information.
 +
 
 +
 
 +
[[Category:SMILA]]

Revision as of 12:25, 21 October 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:

Getting the source code

There is more than one way of getting the code into your Eclipse workspace. The following sections will describe how to get the source code via SVN (recommended!).

As an alternative, you could download the complete source code from the release download page or the nightly build downloads and unpack the archive into your workspace.

Installing SVN Provider

(skip this section if SVN Team Provider is already installed in your eclipse IDE)

  • Install Subversive SVN Team Provider and Subversive SVN JDT Ignore Extensions from the Eclipse software repository.
  • Restart Eclipse.
  • Select Windows > Preferences > Team > SVN. This should open the Subversive Connector Discovery window.
  • 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.
Get source code from SVN

There are two ways for this, automatically by using the Project Set File or manually. Both are described in the following:

manually checking out and importing the projects:

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.

automatic checkout and import by using the Project Set File:

Hint:: New projects should always be added to the .psf file so you can import them (as before): right click on .psf file 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. If projects are removed you have to remove them manually from the workspace, this can't be handled via .psf file.

After having imported the source code into your workspace, it will show up a lot of errors. Don't worry, they'll disappear after the next steps below.

Defining the target platform

The target platform defines the set of bundles and features that you are developing against. 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 Juno (Release 4.2).

Using the target platform provided by SMILA
  • Checkout ../org.eclipse.smila/trunk/releng (if you haven't already done before)
  • Open the file SMILA.releng/devenv/SMILA.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

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:

  • Click Run--> Debug Configurations and expand OSGI Framework.
  • Select the SMILA launch file.
  • 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.

Additional steps

The following steps may be needed for special purposes. If you are a SMILA user who only wants to integrate an own component you won't need them.

Delta Pack

(only needed for building the software outside of eclipse IDE)

For building the software you may need to add a "Delta Pack" to an Eclipse SDK installation. You can download it from the here. After downloading, you can copy the contained plugins and features in your eclipse installation.

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. (Hint: For installing the Checkstyle plugin, use location: "http://eclipse-cs.sf.net/update/")

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:

  • Open Window -> Preferences and go to Checkstyle.
  • Click New..., enter SMILA Checkstyle as the name, click Import..., and select SMILA.builder/checkstyle/smila_checkstyle-5.xml from your workspace. Click OK.
  • 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.
  • Select SMILA Checkstyle and click Set as Default.
  • Click OK.
    Now you should not get those error messages again.
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

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

Copyright © Eclipse Foundation, Inc. All Rights Reserved.