Client samples

Both distributions come with a sample client, located in the ZIP's sample directory.

These samples are implemented as unit tests, and are run using Maven 2.


To run the samples you need to :

  • install Maven 2 .
  • install the JCopist client JAR in your local Maven repository.

    In the RMI distribution, the client JAR is located in the lib directory.

    In the Web Services distribution, the client JAR is located at the root.

    To install it, run the following from the command line :

    mvn install:install-file -DgroupId=net.sf.jcopist \
       -DartifactId=jcopist-client \
       -Dversion=<VERSION> \
       -Dpackaging=jar \
       -Dfile=jcopist-client-<VERSION>.jar \

    Where <VERSION> is the version of the distribution.


Unzip the sample directory on your filesystem.

Launch the JCopist server.

Cd to sample/*client and run mvn test . The sample hot-deploys a basic template, calls the synchronous service, and saves the resulting file on the filesystem.

Have a look at the source in sample/*client/src/test/java , it is self-explanatory.