How to package projects which provide only resources into an application archive

How to package projects which provide only resources into an application archive

book

Article ID: KB0080493

calendar_today

Updated On:

Products Versions
TIBCO Streaming 10

Description

I have a common schema project that includes only Schemas.sbint. I tested the projects in StreamBase Studio without problem, but I could not start a node from command line after including this common project in the application archive.

The schema project is used by other EventFlow fragment projects to provide a single place for the definition of shared schemas.

Issue/Introduction

Project dependency guidance

Resolution

Every fragment included in an application archive project must contain a runnable Java or EventFlow fragment. Projects that have nothing to run, but simply provide files for other projects to use are "resource projects" (identified as Java or EventFlow fragment types). Resource projects are included by Java or EventFlow fragment projects as dependencies in their pom.xml.

A resource project cannot be included as a direct dependency of the Application project since it will not be run as its own engine.

A correct dependency configuration is:

1) The resource project:
  SchemaProvider (ep-eventflow-fragment)
    com.company
      Schemas.sbint

2) The EventFlow fragment project:
  SchemaUser (ep-eventflow-fragment)
    com.company
      Application.sbapp
    pom.xml (dependency on SchemaProvider)

3) The Application project:
  Application
    pom.xml (dependency on SchemaUser)

When the SchemaUser fragment is built, it automatically contains the SchemaProvider project. The Application project does not need to know about the "resource provider" project.