ICAT Clients Installation

icat.client only consists of a jar file that is made available in the maven repository of the ICAT project. It does not need to be installed locally. In order to use it in a Java application, add a dependency for the appropriate version of icat.client to the pom file of your application (see below for details). The build process will then fetch it from the repository as needed. Alternatively, if you are not using maven, download the jar file and add it to the classpath of your project.

Compatibility

For full functionality you need an icat.server version 5.0.0 or greater. The restful client will work with earlier releases of the icat.server except that individual calls will fail if not supported by the server.

Prerequisites

  • The icat client distribution: icat.client-5.0.0-SNAPSHOT-distro.zip
  • A deployed icat server. This is not necessary for deployment but it will be required subsequently to use the client.

Java clients

There are two files that should be made available to those wishing to use the ICAT client:

icat.client-5.0.0-SNAPSHOT.jar
the client library which the user should add to the classpath.
icat.client-5.0.0-SNAPSHOT-sources.jar
the source code of the client, which is especially useful when developing within an IDE.

Using the Java client from maven

It is expected that most people will express their dependency upon the icat.client by means of a maven pom file. To do this the user needs to define the repository and express the dependency as indicated in the snippet below:

<repositories>
   <repository>
      <id>ICAT Repo</id>
      <url>https://repo.icatproject.org/repo/</url>
      <snapshots>
         <enabled>false</enabled>
      </snapshots>
   </repository>
   ...
</repositories>

<dependencies>
   <dependency>
      <groupId>org.icatproject</groupId>
      <artifactId>icat.client</artifactId>
      <version>5.0.0-SNAPSHOT</version>
   </dependency>

   <dependency>
      <groupId>org.glassfish</groupId>
      <artifactId>jakarta.json</artifactId>
      <version>1.1.5</version>
   </dependency>
   ...
</dependencies>