Skip to content

Building and using a toolkit that uses Maven to handle dependencies

hildrum edited this page Jan 8, 2015 · 1 revision

This page gives directions for building a typical IBMStreams toolkit. It applies to applies to streams.inet, streamsx.messaging, streamsx.hdfs, and streamsx.hbase, and perhaps others. As alternative to the directions below, you can download a release of the toolkit; however the releases may not have the newest features and bug fixes.

If you plan on developing on the toolkit, particularly if you want to share your work with either your team members or the IBMStreams community, these directions may be more useful: https://github.com/IBMStreams/administration/wiki/Using-IBMStreams-from-Streams-Studio-%28draft%29

Getting Started at the Command-Line

To get started with an IBMStreams toolkit

  1. Clone the repository to your local file system.
  2. Install Maven
  3. Once Maven is installed, export M2_HOME="Mavin_Install_Location"
  4. Go to the root of the toolkit (com.ibm.streamsx.messaging)
  5. Type "ant"

This will invoke the Ant Build. build.xml will in turn invoke Maven to download all dependencies required for Kafka. MQTT dependencies are already included as part of the toolkit. Once the dependencies are downloaded, build.xml will proceed to build the java files and call spl-make-toolkit.

Getting Started with Streams Studio

Note: Make sure Ant and Maven are installed in your remote host.

To import this toolkit project into Streams Studio:

  1. Install "Egit" into Streams Studio (https://www.eclipse.org/egit/)
  2. In the Git Repositories View, click on the "Clone a Git Repitory" button
  3. After the repository is cloned, follow the dialog to import existing project into your workspace.
  4. You will not have the dependencies needed for Studio to build the project correctly. Go to the command line and to the root of the toolkit project (for example, streamsx.messaging/com.ibm.streamsx.messaging).
  5. Type "ant maven-deps" - to kick off a build at the command line for the first time. This will get all the dependencies downloaded.
  6. Refresh your project in Streams Studio to get all the jar files included in your workspace
  7. Build the com.ibm.streamsx.messaging toolkit project in Studio - The build should be successful at this point.

Getting Started with Streams Studio on Windows

Note: Make sure Ant and Maven are installed in your remote host.

You can set up remote development on Windows.

To import this toolkit project into Streams Studio on Windows:

  1. Install "Egit" into Streams Studio (https://www.eclipse.org/egit/)
  2. In the Git Repositories View, click on the "Clone a Git Repitory" button
  3. After the repository is cloned, follow the dialog to import existing project into your workspace.
  4. Select the toolkit project, Right click -> Copy project to remote host - This will copy the project to the remote Linux host where actual compilation needs to happen.
  5. You will not have the dependencies needed for Studio to build the project correctly at this point. Open a command prompt to the remote Linux host.
  6. Go to the root directory of the toolkit project
  7. Type "ant maven-deps" - to kick off the ant build that pulls in all the necessary dependencies.
  8. In Streams Studio on Windows, select the "opt" folder under the toolkit project. Right click -> Remote Reconciler -> Pull from (remote host) - This action will pull all the jar files from your remote Linux host to your Windows machine.
  9. Build the com.ibm.streamsx.messaging toolkit project in Studio - The build should be successful at this point.