Packaging

The Maven ESB plugin supports packaging of ESB related projects into reusable artifacts. These artifacts are ZIP files which can be referenced by other ESB projects (e.g. ESB service type can be referenced by an instance project) via Maven dependencies.

These ZIP artifacts contain additional information about the artifact which is used to package the artifacts at the SDM level. This information is stored in the form of ".snipped" files. The different snippet types are explained in the snippets section of this document.

An important detail is the implementation of the dependency handling in the plugin. During packaging the plugin check all dependencies and makes sure that it doesn't export/package anything that is already packaged in a transitive artifact (e.g. service instance projects with a dependency to a service type do not package/export the service type). This mechanism allows it to keep the artifact size at a minimum and avoids duplicate components. Of course the developer is responsible to define the correct dependencies.

Typically, the following projects types will be used:

  • ESB Service Type
  • Process ESB project
  • SDM Project

It's important to put project resources into the proper project to allow standalone reuse.

ESB Service Type

Every ESB service type has it's own project.

The project contains:

  • Service Java source
  • Test Java source
  • esbstyp + properties file
  • Test resources
  • Maven site

Process ESB project

ESB process projects contain the ESB process file and all related resources that are referenced by service runtime parameters (NOT init!). Generated-src generation will use the ESB process as the root artifact. Additional roots can be added through the ExportProperties.xml file. One process per project is recommended.

Sample project structure:

The project contains:

  • ESB process
  • Resources used by runtime parameters (e.g. xsl, xcbr, js)
  • ExportProperties.xml (optional)
  • Test resources
  • Maven site

SDM Project

Normally this is top level project and combines all artifacts into a SDM model. Needed Queues are extracted from the queues snippets and added to the target Model by the plugin. By default all services and process are in one ESBContainer. Distribution of services to multiple containers is supported by plugin configuration options. The plugin uses service instances snippets to identify which service instances are available in this SDM model.

The project contains:

  • SDM Model (Model.xml, Tuning.xml, tailoring)
  • Resources used by runtime parameters (e.g. xsl, xcbr, js) which will be imported in the installed Sonci Domain and can be referenced in tailoring properties files.
  • Test resources
  • Maven site

Sample ExportProperties File

<export>
        <ignore>
                        <artifact type="ESB" path="/Endpoints/iocc.Error"/>             
        </ignore>
        <roots>                         
                <artifact type="SonicFS" path="/Resources/servicebase.properties"/>
                <artifact type="SonicFS" path="/Resources/log4j.properties"/>
                <artifact type="SonicFS" path="/System/SonicESB/7.6/Common/jsHelperFunctions.js"/>
                <artifact type="SonicFS" path="/System/SonicESB/jsHelperFunctions.js"/>
                
                <artifact type="ESB" path="/Endpoints/iocc.Tracking"/>
                        
                <!-- ESB connection used by all flows and-->
                <artifact type="ESB" path="/Connections/ioccConnection"/>
        </roots>
</export>