A SwitchYard project is a Maven based project with the following characteristics:
a switchyard.xml file in the project's META-INF folder
one or more SwitchYard runtime dependencies declared in the pom.xml file
org.switchyard:switchyard-plugin mojo configured in the pom.xml file
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.
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:
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.
Press Finish to create the new project.
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.