Maven Packaging Types

ESB Service Type (esbstyp)

When a service type is packaged the plugin uses the esbstyp-package goal to perform the following steps:

  • Adds all JAR dependencies as service instance classpath entries to the .esbstyp file
  • Imports the service type to the local Domain (if available)
  • Generates a XAR ready for deployment (including the JARs from dependencies)
  • Creates snippets
  • Create ZIP as output in target folder

The deployable artifact is a ZIP file which contains the following files:

  • XAR (xars/artifactId-version.xar)
    • Service Type XML (with correct classpath)
    • Service Type properties
    • Service Type JAR
    • JARs of the used java libraries
  • Tailoring rules XML (artifactId-version-Tailoring.xml)
    • Tailoring rules that include the service types init parameters for tailoring. (just for reference, not further used)
  • Tailor Map XML (xars/tailor/artifactId-version.xar.xml)
    • Empty for service types
  • SDM Snippets (xars/sdm-snippets/)
    • Instances (xars/sdm-snippets/artifactId-version.instances.snippet)
      • Service instances.
      • Empty for service types
    • Queues (xars/sdm-snippets/artifactId-version.queues.snippet)
      • Queues referenced by any endpoint
      • Empty for service type
    • Rules (xars/sdm-snippets/artifactId-version.rules.snippet)
      • Service Rules for tailoring
      • A rule for the service type and its init parameters
    • Variables (xars/sdm-snippets/artifactId-version.variables.snippet)
      • Generated Tailoring variables (will result in generated.tailoring.properties in SDM)

Sample ZIP:

Sample XAR:

ESB Project (esb)

When an ESB project is packaged (mvn package) the plugin uses the esb-export goal followed by the esb-package goal to perform the following steps:

  • esb-export goal
    • uploads ESB processes (esbp) to local Domain
    • ESB export
      • provided/generated ExportProperties.xml
      • ESB processes are always added to the ExportProperties.xml as roots
    • /deploy/generated-src is created/updated
  • esb-package goal
    • Creates the XAR file
    • Creates snippets
    • Create ZIP file

    The deployable artifact is a ZIP file which contains the files for instance and process projects as discussed in the next sections. Dependencies of type JAR are added to the resulting XAR and are placed at a central location in the SonicFS (sonicfs://ESBResources/...).

Process project

  • XAR (xars/artifactId-version.xar)
    • Process configurations
    • Endpoints
    • Connections
    • Resources referenced by runtime parameters
  • Tailoring Rules XML (artifactId-version-Tailoring.xml)
    • Tailoring rules that include the service types referenced by the process
  • Tailor Map XML (xars/tailor/artifactId-version.xar.xml)
    • Map for the service Connections and Endpoints
    • tagged already with the variable names for tailoring (e.g. @ServiceInstanceName.initparam1@)
  • SDM Snippets
    • Instances (xars/sdm-snippets/artifactId-version.instances.snippet)
      • Process instances of this project
    • Queues (xars/sdm-snippets/artifactId-version.queues.snippet)
      • Queues referenced by any endpoint.
    • Rules (xars/sdm-snippets/artifactId-version.rules.snippet)
      • Empty for process projects
    • Variables (xars/sdm-snippets/artifactId-version.variables.snippet)
      • Generated Tailoring variables (will result in generated.tailoring.properties in SDM)
      • Variables used in the tailor map (e.g. @ServiceInstanceName.initparam1@)

    Sample ZIP (Process project):

    Sample XAR (Process project):

SDM Project (sdm)

When a SDM model is packaged the plugin uses the sdm-package goal to perform the following steps:

  • Generates a XAR file that contains the ESB container definitions.
    • By default all instances are put into one ESB container (name: ESBContainer). This can be configured such that instances are distributed over multiple containers with multiple listeners.

      Instances under consideration are pulled from all transitive dependencies found in the instance snippets of each instance project.

    • Resources of the SDM project are added to the XAR as well.
  • Enriches the SDM Model of this project (found under src/main/SDM) by looking at all transitive dependencies
    • Queue snippets: Add Queues to SDM model
    • Add ESBArchive entries for each XAR found
    • Add MF Container entries for ESB containers
  • Create a generated.tailoring.properties for all variables listed in the snippets
  • Verify tailoring properties of this project and list variables which are not referenced in the properties
  • Add everything to a ZIP

The deployable artifact is a ZIP file which contains a SDM model ready for install.