cunningt / plugin-switchyard

SwitchYard Forge Plugin

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

plugin-switchyard

SwitchYard Forge Plugin

Switchyard Forge Clojure Component

This project provides an implementation of a Forge plugin capable of generating Clojure services in SwitchYard.


Installing the Clojure Facet

Before you start make sure that you have the required plugins in your Forge classpath. This can be done by putting the jars in Forge's lib directory or putting them in ~/.forge/plugins.

The Clojure plugin depend on the switchyard faced. The SwitchYard facet will update the current project and add files like switchyard.xml. To see which facets are install you can run the following command: > project list-facets

The facets that are green in this list are the ones that are installed on the current project.

Installing the switchyard facet

> project install-facet switchyard

Installing the switchyard.clojure facet

> project install-facet switchyard.clojure

clojure-service create command

> help clojure-service create

[clojure-service create] - Create a new implemenation.clojure

[OPTIONS]
    [--serviceName, -s] - The service name - The SwitchYard service name to use for this implementation
    [--inlineScript, -i] - Use inline Clojure script - Path to the Clojure script to inline, the content will be placed into the script element
    [--emptyInlineScript] - Creates an empty 'script' element - An empty 'script' element will be created that can be filled in later.
    [--externalScriptPath, -e] - Path to the external Clojure Script - Path to the external Clojure script to be referenced from the 'scriptFile' attribute
    [--emptyExternalScriptPath] - Creates an empty 'scriptFile' attribute - An empty 'scriptFile' attribute will be created that can be filled in later.
    [--injectExchange, -x] - Inject the SwitchYard Exchange object into the Clojure script - The SwitchYard Exchange will be injected into the Clojure script if this value is set. If not, only the Message content will be injected.

Creating with an inline script

> clojure-service create --serviceName testing --inlineScript sample.clj --injectExchange 

Creating with an external script

> clojure-service create --scriptFile "/some/path/sample.clj"

Enable stacktraces in Forge

set VERBOSE true

_ _ _/

About

SwitchYard Forge Plugin


Languages

Language:Java 97.5%Language:XSLT 2.5%