This topic provides a high-level of the Maven project format used in StreamBase Studio.
StreamBase Studio uses the Maven project format provided by Eclipse. Maven is a software build and management system aimed primarily at Java developers.
StreamBase Studio projects are in Maven project format, and all projects are built and run under Maven control. Thecontext menu includes several Maven commands and goals.
Using Maven provides a well-known, thoroughly documented, and standard way to specify project dependencies, both within and external to the project. Maven automatically configures search paths for code in specified dependencies, and also manages resource search paths automatically.
The Maven system assumes that each Studio project produces an artifact as the output of its build. The artifact produced by a standard Java project is usually a JAR file. The artifact produced
by a StreamBase EventFlow project is an EventFlow fragment archive. This is a
.zip file that contains your EventFlow modules and resources in runnable format.
Likewise, the artifact produced by a LiveView project is a LiveView fragment archive.
When Maven is run, it follows the directions in the project's Project Object Model, which is defined in an XML file at the root of each project folder named
pom.xml. The StreamBase POM files can be run both in Studio and at the command prompt with the mvn command, if your system has a recent installation of command-line Maven installed.
The Maven POM defines a fixed lifecycle for the stages of building an EventFlow project. You can specify any stage as a goal when you run Maven. This automatically runs all defined stages prior to the specified goal. For an EventFlow project in good shape, you only need to specify the two goals clean install, which runs all the stages of cleaning your project folder, then runs all the stages of compiling, packaging, verifying, and unit-testing your project before running the install stage.
For StreamBase projects, the install goal means that an EventFlow fragment archive for your project is generated and copied into your project's
target folder. The goal goes on to copy that file to your local Maven repository. Likewise for LiveView projects, the install goal means to generate a LiveView fragment archive file in the
target folder, and to then copy the archive file to the local Maven repository.
By default, the local Maven repository is the
.m2 folder in your home directory on your local machine. Your site might prefer to configure a central site repository.
Each StreamBase EventFlow fragment project in Studio has a project structure defined by Maven standards. When you create a new project with> > > , Studio generates a project format much like following:
If you create LiveView project with
The folders at the top of the project are convenience links to actual file system objects. The only folders actually created
on the file system are the
target folders and the
See Where to Place Files to determine where to put different file types in your Maven-format Studio project folders.