Maven requires a strict organization of files within the project hierarchy. You must organize files of different types into the folders reserved for them by the Maven project structure.
Throughout this page, the term packagename refers to the project's GroupId + ArtifactId, and takes a form such as
com.example.deptname.. This is established when you run the > > wizard or the upgrade wizard, and applies to all fragment types and StreamBase Application projects.
A typical StreamBase project folder for an EventFlow fragment has the structure shown in the following image:
A LiveView fragment project adds
src/main/liveview to this structure.
The following StreamBase file types belong in the
EventFlow module files with
EventFlow module layout files with
StreamBase Interface files with
StreamSQL module files with
.ssqlextension. (StreamSQL is a legacy, deprecated language alternative to EventFlow, but StreamSQL files are still allowed to help migrate legacy StreamBase applications.)
Files in this folder are automatically on Maven's module search path.
You can add subfolders or child folders to the
folder to organize your files into different packages. To create a new folder in a StreamBase Maven project:
packagenamefolder for your project under
Right-click and select> .
This creates a subfolder that is automatically in the Maven module resource path.
The ep-maven-plugin will now consider eventflow sources from src/test/eventflows. These will be built and be available for local maven module testing. They will not get shipped in the eventflow fragment archive.
This folder is found in LiveView projects only, and is created when you run> from the context menu of a LiveView project folder. This folder contains StreamBase interface files with
.sbintextension that are generated to define the schemas of LiveView tables.
This folder is found in LiveView fragment projects only. The following LiveView file type belongs in the
LiveView configuration files with
Configuration files in this folder are compiled into LiveView tables when you run the LiveView project.
The> > wizard and upgrade wizard also create two subfolders:
lvweb.warfile that adds TIBCO LiveView™ Web functionality to a LiveView project.
lv-web, which is a container for customer-provided LiveView Web extension code in
If the legacy project upgrade wizard finds LiveView configuration files in subfolders of the legacy project, it creates the matching subfolder in
src/main/liveviewto contain those files.
Place all HOCON configuration files in
HOCON configuration files must use the extension
Use any basename for each HOCON file that reminds you of its contents.
The actual HOCON type for each file is specified in the
type=line near the top of the file. This is why having several HOCON files in the same folder does not create conflicts.
Certain configuration files are generated for you by the> wizard or upgrade wizard, such as
fragment.conf. These are generally templates that provide the structure of a configuration file without setting any parameters.
This folder contains HOCON configuration files that are to be considered when running unit tests for the current project.
If your project includes Java files that implement a StreamBase extension such as a custom function, custom operator, or custom adapter, place those files in the
You can organize your Java files into different packages using> from the
packagenamefolder's context menu.
The following file types belong in the
src/main/resourcesfolder. Files in this folder are automatically on the Maven resource search path.
StreamBase Feed Simulation files with
Any CSV file used as input for a feed simulation, or used by any operator or adapter.
Image files used as custom icon overlays for Module Reference and Extension Point operators.
SQL scripts used to connect to a JDBC resource.
Decision Table files in both
Decision Table Domain Model files with
In general, any file that needs to be opened and used by any operator or adapter while your StreamBase application is running.
Adapter configuration XML files used by certain StreamBase adapters such as EMS and JMS adapters. These files are named
<adapter-configurations>as the top-level element.
In general, files must be at the root of
src/main/resourcesto be automatically in the Maven resource path. You can organize resource files into subfolders, and reference files with a relative path name such as
subdir/myresourcefile. However, chooser dialogs in StreamBase Studio do not descend into subfolders to show their list of resource files.
This folder holds StreamBase JUnit test files that are run with the Maven Test goal. The New Project wizard generates the skeleton of such a file and places it in the
src/main/java. You must complete this file to get a working test. Add other test files as your project grows with more EventFlow modules.
This folder holds any test-specific resource files needed by the StreamBase JUnit test files you want to run. The New Project wizard generates a skeleton
logback.xmlfile in this folder for you to customize as needed.
Resource file types for tests are any of the same file types described above for src/main/resources.
- Supporting JAR Files
Certain adapters and operators require access to implementing JAR files, which are sometimes publicly available and sometimes proprietary. For example, the JDBC Table data construct requires information about the vendor-provided JAR file or files that implement JDBC access to that vendor's database system.
See Using External JAR Files for a discussion of the placement options for such JAR files.
When you use an Eclipse-native feature such as
This is because the folder names described in the previous section are created with an Eclipse convenience link feature that
is much like file system symbolic links. Using these linked folder names saves you from having to navigate down long folder
paths such as
src/main/eventflow/com/tibco/sb/sample/firstapp to locate files.