Skip to content

Running the project

Adriana Cristina Draghici edited this page Jun 25, 2013 · 4 revisions

Running Teamshare with Maven

Teamshare depends on several libraries packaged in JARs, so Maven can be used for launching while satisfying all dependencies. The application depends on input data provided from two different sources:

  • from some JSON files currently used to store user and team data, located in Teamshare repository directory in data/prototype/.
  • from Java properties which can be passed to the Maven exec plugin by using -D command line parameter.

The teams and their members can be customized in data/prototype/teams01.json. The users and their devices can be customized in data/prototype/users01.json. It is required to set there the address, and ports (icePort, swiftPort) of user devices.

The test Teamshare run it on two machines at the command line. An instance can be launched on a machine with a command similar to this one:

LD_LIBRARY_PATH=lib:. mvn exec:java -q -X \
    -Dteamshare.user=calin -Dteamshare.device=calin_desktop \
    -Dteamshare.path=/home/calinburloiu/tmp/Teamshare1/ \
    -Dteamshare.ice.port=6771 -Dteamshare.swift.port=6881

Properties teamshare.user and teamshare.device need to match user id and and user device id from the users01.json file. They represent the user and its device which log in on that instance. Obviously, on the second testing machine, a different user id and device id need to be passed, corresponding to another user and its device from the JSON file. teamshare.path represents the path where Teamshare file will be stored. Choose some unassigned ports for teamshare.ice.port and teamshare.swift.port and make sure they match with those configured in users01.json file.

In the Teamshare folder set for each machine create a team folder with hold the name set in teams01.json. Run the two Teamshare instances as previously described and wait until "Press any key [...]" appears. After creating a file in the Doc directory of a machine, it should appear in the corresponding directory of the other machine.

DISCLAIMER

  • Currently the implementation is designed for the synchronization of a single file. A new Java-C++ wrapper needs to be implemented for libswift which supports multiple files through channels.
  • The synchronization does not work, because libswift is crashing.

Clone this wiki locally