Skip to content

CUPUS Develop

aleant edited this page Jul 3, 2014 · 4 revisions

System requirements

All you need to build this project is Java 7.0 (Java SDK 1.7) or later, Maven 3.0 or later. The service of this project is designed to be run on a cloud server.

Download

Source code can be cloned using GIT from OpenIoT’s repository on GitHub at the following address: https://github.com/OpenIotOrg/openiot.git

The CUPUS middleware is available under the “openiot/modules/CUPUS” folder.

Deploy from the source code

If you have not yet done so, you must Configure Maven before testing the Cloud Broker deployment.

Build and Deploy the Cloud Broker

NOTE: The following build command assumes you have configured your Maven user settings. If you have not, you must include Maven setting arguments on the command line.

  1. Open a command line and navigate to the root directory of the CUPUS project.
  2. Type this command to build and deploy the archive: mvn package
  3. This will build the service in target folder and now service is ready to be started by command in terminal: java –jar target\StartBroker.jar <path_to_config_file > <classpath>

The classpath argument is the CUPUS-1.0-jar-with-dependencies.jar file which serves as a library for the middleware components.

Undeploy the Cloud Broker service

Stop the running instance of the service by typing “QUIT”

Build and Deploy the Publisher

NOTE: The following build command assumes you have configured your Maven user settings. If you have not, you must include Maven setting arguments on the command line.

  1. Open a command line and navigate to the root directory of the CUPUS project.
  2. Type this command to build and deploy the archive: mvn package
  3. This will build the service in target folder and now service is ready to be started by command in terminal: java –jar target\StartPublisher.jar <path_to_config_file> <path_to_publications_folder>

An example of the config file and publications folder is given in the src/main/resource folder.

Build and Deploy the Subscriber

NOTE: The following build command assumes you have configured your Maven user settings. If you have not, you must include Maven setting arguments on the command line.

  1. Open a command line and navigate to the root directory of the CUPUS project.
  2. Type this command to build and deploy the archive: mvn package
  3. This will build the service in target folder and now service is ready to be started by command in terminal: java –jar target\StartSubscriber.jar <path_to_config_file > <path_to_subscriptions_folder>

An example of the config file and subscriptions folder is given in the src/main/resource folder.

Deploy from Eclipse

To integrate and deploy CUPUS middleware components in Eclipse one should follow steps below:

  1. Import Existing maven project “File>Import>Maven>Existing Maven Projects”
  2. Click the “Browse” button and navigate to the CUPUS source code directory that has been previously downloaded.
  3. Click the Finish button.
  4. Open the org.openiot.cupus.examples package
  5. Right click on the “BrokerExample.java”, "SubscriberExample.java", "MobileBrokerExample.java" or "PublisherExample.java" choose “Run As>Java Application”

More detailed documentation about CUPUS middleware and its components is given in Deliverables 3.4 and 4.5.

Clone this wiki locally