Skip to main content
Skip table of contents

Work with the SDK samples

The SDK sample pack demonstrates the various tool types available in Data Management. The easiest way to get started with the samples is by importing the sample pack as a Maven project. 

Using Eclipse

Importing the project

Eclipse bundles Maven and provides good Maven integration, making it simple to import and build a Maven project:

  1. From the menu bar, select File > Import.

  2. Select Existing Maven Projects and click Next.

  3. Browse to the root of %SDK_HOME% and click OK.

  4. Eclipse will populate the Projects list with /pom.xml MyGroundId:MyTools:1.0:jar. Accept these defaults and click Finish.

You'll end up with a MyTools project in your Package Explorer.

Building the project

You can build the project in Eclipse:

  1. Right-click the MyTools project and select Run As > Maven build. 

  2. In the Edit Configuration dialog, enter Package RPDM SDK samples (or something similarly descriptive) in the Name box.

  3. Leave Base directory unchanged.

  4. In the Goals box, enter package.

  5. Click Apply, then Run.

Eclipse should print a message like this to the console::

[INFO] Building jar: \PATH\TO\SDK\samples\target\MyTools-1.0.jar
[INFO] ------------------------------------------------------------------------

You can find the samples JAR in %SDK_HOME%\target.

You'll also notice some warnings like this:

[WARNING] 'dependencies.dependency.systemPath' for redpoint:dataitems:jar should not point at files within the project directory, ${project.basedir}/../lib/dataitems-1.0.jar will be unresolvable by dependent projects @ line 28, column 16

You can ignore these for now. When you start building your own projects, you may want to change how Maven resolves dependencies.

If you encounter an error like the one shown below, you may want to check this link to resolve the error, and then try to build the project again.

[INFO] -------------------------------------------------------------
[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.272 s
[INFO] Finished at: 2015-10-14T09:45:37+08:00
[INFO] Final Memory: 7M/121M
[INFO] ------------------------------------------------------------------------
    [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project dataflow_examples: Compilation failure
[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?

Running the project

Once you've built the samples, you're ready to run them in Data Management. There are two ways to do this.

The simplest is to place the tool’s JAR file in the  %RPDM_HOME\java_plugins directory. RPDM will auto-discover and load any tool JAR it finds in its java_plugins directory. This is the preferred method of loading tool JARs. Alternatively, you can do this:

  1. In the RPDM client, go to Repository > Settings > Site > Java.

  2. Under Add folders and jars to classpath, add the JAR you created during the Building the Project procedure
    (e.g. %SDK_HOME%\target\MyTools-1.0.jar) and commit your changes.

To see the sample tools on the palette, select Reset from the Palette menu. Once the palette is reloaded, scroll to the bottom of the palette, until you see the categories Java Samples and SDK Testing.

Drag the sample tools from the Palette to the Canvas, where you can connect them and run them like standard Data Management tools.

From here, you might want to explore the samples, learn more about the tool lifecycle, build your own tools, and debug your tools.

Using Netbeans

Importing the project

NetBeans 8.2 bundles the Maven plugin and provides a similar Maven integration as Eclipse, making it simple to import and build a Maven project:

  1. From the menu bar, select File > Open Project (CTRL+SHIFT+O).

  2. In the Open Project file explorer, Browse to the root of %SDK_HOME%, accept the defaults, and click Open Project.

  3. You'll end up with a MyTools project directory in your NetBeans Projects Explorer.

Building the project

You can build the project in NetBeans: 

  • On the Projects Explorer window, Right click MyTools, and then click Clean and Build.

NetBeans should print a message like this to the console:

--- maven-install-plugin:2.3.1:install (default-install) @ MyTools ---
Installing C:\%sdk_home%\target\MyTools-1.0.jar to C:\%userprofile%\.m2\repository\MyGroupId\MyTools\1.0\MyTools-1.0.jar
Installing C:\%sdk_home%\pom.xml to C:\%userprofile%\.m2\repository\MyGroupId\MyTools\1.0\MyTools-1.0.pom
Total time: 5.212s
Finished at: Thu Jan 11 14:12:51 MST 2018
Final Memory: 23M/183M

You can find the samples JAR in %SDK_HOME%\target.

You may encounter build errors like this:

Total time: 3.243s
Finished at: Wed Oct 14 13:34:47 SGT 2015
Final Memory: 16M/246M
Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project MyTools: Compilation failure: Compilation failure:
net/redpoint/dataflow/samples/[154,31] error: cannot find symbol
net/redpoint/dataflow/samples/[172,34] error: cannot find symbol
-> [Help 1]

In this case, you'll need to configure some additional properties for a successful Maven build on Netbeans:

  1. Right-click MyTools and select Properties.

  2. Under Categories, select Actions, and then select Clean and Build Project.

  3. Paste maven.compiler.failOnError=false into the Set Properties field.

  4. Rebuild the project.

Configure an SDK project in Eclipse

After downloading and installing the Redpoint Data Management SDK sample pack, you can configure a new SDK project in Eclipse.

If you have Maven installed and want to use it

Eclipse bundles Maven and provides good Maven integration, making it simple to import a Maven project. You can use the SDK samples as your Maven project template to bootstrap your Data Management tool development:

  1. Download and unpack the SDK samples to a directory named MyProject or something comparably descriptive.

  2. Copy rpdmcore-VERSION-shaded.jar from %RPDM_HOME%\java to MyProject\lib.

  3. Copy rpdmsdk-VERSION-shaded.jar from %RPDM_HOME%\java to MyProject\lib.

  4. Edit MyProject\pom.xml and change artifactId and groupId to something that makes sense for your project.

  5. From the Eclipse menu bar, select File > Import.

  6. Select Existing Maven Projects and click Next.

  7. Browse to the MyProject project and open it.

  8. Accept the defaults and click Finish.

You should see your new project in the Eclipse project explorer. You can add your Sources and Resources to the project and start developing. To build your project, see "Using Maven" in Building and installing your tool.

By default, projects based on the bootstrap project are configured to resolve required dependencies using system-scoped artifacts. This allows us to distribute a self-contained bootstrap project SDK that users can start working with immediately. If you’re familiar with Maven, or you'll be developing lots of Tools and plan to set up your own Maven archetypes, you may wish to change this behavior, and instead install dependencies to your local repository.

If you don't have Maven installed, or don't want to use Maven

You can configure an SDK project in Eclipse without using Maven, though it required a bit more work:

  1. From the menu bar, select File > New > Java Project.

  2. In the Project name field, name your project something descriptive.

  3. Under JRE, ensure you're using a 1.8 JRE.

  4. Accept the remaining default settings and click Next.

  5. Under the Libraries tab, click Add External JARs.

  6. Browse to %RPDM_HOME%\java, select rpdmcore-VERSION-shaded.jar, then click OK

  7. Under the Libraries tab, click Add External JARs.

  8. Browse to %RPDM_HOME%\java, select rpdmsdk-VERSION-shaded.jar, then click OK

  9. Click Finish

You'll now have a new project in your package explorer. You can add your Sources and Resources to the project and start developing. You're not quite done yet - to run your tools, you must still configure Eclipse to build a JAR file that can be installed into Data Management. See "Without Maven" in Building and installing your tool.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.