Developer Studio - Getting Started
Accessing Developer Studio
You can access Developer Studio features by using the Developer Studio Dashboard. From the Eclipse Welcome page, you can click 'Open Dashboard', or if you are already in the workbench, click the Developer Studio menu and select Open Dashboard.When
the dashboard appears, you can scroll down to view the available links to all features of
Developer Studio.
Additionally you can choose File -> New -> Other and select an item from the WSO2 category.
If you have an existing project, you can right-click on the project, choose New, and then choose one of the WSO2 options from the menu.
Quick Start Guide
This includes fundamentals of Developer Studio to develop WSO2 projects in Eclipse.- Creating New Projects
- Importing Existing Projects
Let's assume AcmeSuper is a shopping complex with branches in the
cities of Colombo, Galle, and Kandy, and you want to create a different
SOA application for each of the different locations. You have folders on
your local file system, one for each location, that are synched with
branches in your source control system (such as SVN), so you want to
create the SOA application projects in those folders.
First, to
follow along with this example, create a folder called AcmeSuper
anywhere on your file system with three subfolders: Colombo, Galle, and
Kandy. These folders represent the location where your source code is
checked out.
Next, create an Apache Axis2 Service in the Colombo branch by following these steps:
- In Eclipse, choose Developer Studio -> Open Dashboard to display the dashboard (if it's not already visible), and then click the Axis2 Service Project link.
- In the Axis2 Service wizard, specify whether you want to create the service manually (the first option) or from a WSDL. For this example, leave the first option selected.
- Click Next, and then specify the following:
- Unique names for the project, package, and class you are creating for this service.
- Clear the check box and specify the path to the Colombo folder followed by the project name. This will ensure that you're creating the project in the same directory as your existing source code and will make it easier to check the files into your source control system.
- If you want to add this project to any working sets, select the check box and specify the working sets. For this example, we won't specify any working sets.
- Click Next if you want to view the Maven-related information, which is filled in for you automatically, or just click Finish.
All the relevant files have created in the Colombo folder in your local
file system, which makes it easy to check the changes to your source
control system.
You can create a container project at the root level, and all the
projects underneath it, will be displayed under that project. For
example, you might create a general project called AcmeSuper at the root
level and make sure you clear 'use default location' check box and specify the path to the AcmeSuper folder.
When the project is created, it includes the AcmeConsumerServiceColombo service which we already created.
You can now create additional applications in the folder structure by right-clicking a folder and choosing 'New'
followed by the type of application you want to create. For example, to
create a data service inside the Kandy branch, right-click the Kandy
folder in the project explorer and choose New -> Data Service Project.
After you create your applications, you can group them by creating Carbon Application Projects. Choose File -> New -> Other and select Carbon Application Project.
Depending on your requirements, you could create separate Carbon
Application Projects for each and every branch such as one for Colombo,
one for Galle, and one for Kandy, or you could create a single Carbon
Application Project for your root project such as AcmeSuper. You can
then generate Carbon Application Archives (CAR), which can be deployed
to Carbon Servers.
Importing Existing Projects
If you want to create a project within a hierarchy of existing
projects created by another developer, you must import those projects.
For example, assume one of your developers created a project called
Parent with several sub projects under it and checked it into your
source control system. If you want to add projects under the Parent
project, first make sure you have the latest version of this source
code, and then do the following:
- Right-click the Project Explorer in Eclipse and choose Import -> Import.
- In the Import dialog box, expand the WSO2 category, select Existing WSO2 Projects in to workspace, and click Next.
- In the Import Projects dialog, click Browse, select the directory where the Parent project resides on your local file system, and click OK.
- The Import Projects dialog now displays all the WSO2 projects in the Parent project you selected. Select the projects you want to import into your workspace and click Finish.
The projects
are now imported into your workspace, and you can create projects within
this hierarchy as described in the previous section.
Building from Source
WSO2 invites you to contribute by checking
out the source from the Subversion (SVN) source control system using
the following commands, building the product and making changes, and
then committing your changes back to the source repository. For
information on using Subversion, see http://svnbook.red-bean.com.
- Checking out the source
- Access through a proxy
- Building the product
- Committing your changes
Checking out the source
You can use the svn checkout command to download the trunk or a specific branch of Developer Studio to the directory you specify. For example:
Trunk:
svn checkout https://svn.wso2.org/repos/wso2/trunk/tools/ide/eclipse/ wso2devstudio
3.2.0 branch:
svn checkout https://svn.wso2.org/repos/wso2/branches/tools/eclipse/developer-studio/3.2.0/
wso2devstudio
320Access through a proxy
The
Subversion client can be configured to access through a proxy. Specify
the proxy to use in the "servers" configuration file in:
- "~/.subversion" directory for Linux/Unix
- "%APPDATA%\Subversion" hidden directory for Windows. (Try "echo %APPDATA%")
The
comments in the file explain what to do. If you don't have this file,
get the latest Subversion client and run any command. It will create the
configuration directory and template files.
For example, edit the 'servers' file and add something similar to the following:
[global]
http-proxy-host = your.proxy.name
http-proxy-port =
3128
Following are the commands you can run to create complete release
artifacts of WSO2 Developer Studio, including the binary and source
distributions.
Before you build:
- Install Maven and JDK.
- Set the environment variable
MAVEN_OPTS="-Xms768m -Xmx3072m -XX:MaxPermSize=1200m
" to avoid the MavenOutOfMemoryError.
- Make sure the build server has an active Internet connection to download dependencies while building.
- Switch to the directory where you checked out Developer Studio before entering these commands.
Committing your changes
If you are a committer, you can commit your changes using the following command (SVN will prompt you for your password):
$ svn commit --username your-username -m "A message"
No comments:
Post a Comment