JBoss Community Archive (Read Only)

SwitchYard

SwitchYard Projects

A SwitchYard project is a Maven based project with the following characteristics:

A SwitchYard project may also contain a variety of other resources used to implement the application, for example: Java, BPMN2, DRL, BPEL, WSDL, XSD, and XML files.

The Eclipse tooling supports the creation of new SwitchYard projects.  The tooling also allows users to add SwitchYard capabilities to existing Maven projects.

Creating a New SwitchYard Project

Use the New SwitchYard Project wizard to create new SwitchYard project in your workspace.  The wizard produces a new project with the following structure:

  • a switchyard.xml file in src/main/resources/META-INF/

  • a pom.xml file declaring SwitchYard runtime dependencies and configuration for the switchyard-plugin mojo

  • a beans.xml file in src/main/resources/META-INF/

  • a beans.xml file src/test/resources/META-INF/

  • a folder hierarchy for the specified Java package

The newly created project's switchyard.xml file will be opened in the SwitchYard editor after the wizard finishes.

Initiate the wizard by selecting SwitchYard Project from the SwitchYard category in the File→New→Project... wizard.

The first page asks for the name and location for the new project:

images/author/download/attachments/59146357/switchyard-project-wizard-1.jpg
The second page asks for basic project details, including:

  • the Maven groupId for the project

  • the targetNamespace for the SwitchYard application

  • the default Java package name for the project

  • the SwitchYard configuration version

  • the SwitchYard library version

  • the SwitchYard runtime components (e.g. BPM, Camel, SOAP, etc. support) required for the project

The library version can be specified directly using the Library Version field or indirectly by selecting a Target Runtime. Selecting a target runtime will set the library version to match the version provided by the target runtime.

It is not necessary to select any components when creating the project. The tooling will automatically configure components on the project as necessary.

images/author/download/attachments/59146357/switchyard-project-wizard-2.jpg

Press Finish to create the new project.

Adding SwitchYard Capabilities to Existing Projects

SwitchYard capabilities may be added to existing projects in the workspace.  The following additions are made to the project:

  • a switchyard.xml file is added to src/main/resources/META-INF/

  • a beans.xml file is added to src/main/resources/META-INF/

  • a beans.xml file is added to src/test/resources/META-INF/

  • declarations for SwitchYard runtime dependencies are added to the pom.xml file

  • org.switchyard:switchyard-plugin mojo configuration is added the pom.xml file

SwitchYard capabilities can only be added to Maven projects.

If the project is not already a Faceted Project, a prompt asks if you wish to convert the project to a faceted project.

Changing the configuration version updates the SwitchYard namespace URIs declared in the switchyard.xml, e.g. from urn:switchyard-config:switchyard:1.0 to urn:switchyard-config:switchyard:1.1.

Right-click the project and select, Configure -> SwitchYard Capabilities... to add (or modify) SwitchYard capabilities.  A property dialog is displayed allowing configuration of SwitchYard settings for project.  Changes are reflected in the project's pom.xml and switchyard.xml files.

images/author/download/attachments/59146357/switchyard-project-properties.jpg

JBoss.org Content Archive (Read Only), exported from JBoss Community Documentation Editor at 2020-03-13 09:44:56 UTC, last content change 2013-11-13 21:17:40 UTC.