Page tree

Introduction

ChemAxon provides a public repository at https://hub.chemaxon.com for our products and modules. It is designed for integrators and resellers but is available for any registered ChemAxon user as well. How to acquire the required credentials in order to use this repository are described below.

Create your ChemAxon Account

If you do not already have a ChemAxon Account, you may create it via filling the form at the https://accounts.chemaxon.com/register page. Your e-mail address will serve as the username when setting up the repository.

Generate your API key

To generate your API key simply visit your settings page at https://accounts.chemaxon.com/my/settings. Under the ‘Public Repository’ section, you will find a button to ‘Generate API Key’ or your exact key having generated one already.

Configure your project

Docker

First, you need to login to the repository:

echo <API-KEY> | docker login -u <E-MAIL> --password-stdin hub.chemaxon.com

Alternatively, you can paste the following into the ~/.docker/config.json file (in Windows %USERPROFILE%/.docker/config.json):

{
 "auths": {
   "hub.chemaxon.com": {
     "auth": <BASE64(<E-MAIL>:<API-KEY>)>                                             
   }
 }
}


After that, you can pull the images:

docker pull hub.chemaxon.com/<IMAGE>:<TAG>

NPM

First, you need to store your credentials and repository in your .npmrc file:

curl -o ~/.npmrc -u<E-MAIL>:<API-KEY> https://hub.chemaxon.com/artifactory/api/npm/auth

For your npm command line client to work with Artifactory, you first need to set the default npm registry with an Artifactory npm repository using the following command:

npm config set registry https://hub.chemaxon.com/artifactory/api/npm/npm/

Alternatively, you can paste the following into the ~/.npmrc file (in Windows %USERPROFILE%/.npmrc):
_auth=<BASE64(<E-MAIL>:<API-KEY>)>
always-auth=true
email=<E-MAIL>
registry=https://hub.chemaxon.com/artifactory/api/npm/npm/


To install the packages run:

npm install <PACKAGE>

Gradle

If you would like to use Gradle as your build tool, you can follow these instructions to access ChemAxon’s Maven repository. Or you can use the quickstart project as an example.

In your Gradle project, create (or edit if already exists) a gradle.properties file and add these contents. You can also move this file outside your project, into <user home>/.gradle directory.

chemaxonRepositoryUser=<E-MAIL>
chemaxonRepositoryPassword=<API-KEY>
chemaxonRepositoryUrl=https://hub.chemaxon.com/artifactory


In the build.gradle file, add our Maven repository in the repositories block. For example:

repositories {
  maven {
    url "${chemaxonRepositoryUrl}/libs-release"
    credentials {
        username = chemaxonRepositoryUser
        password = chemaxonRepositoryPassword
    }
  }
}

After applying these settings, you can add ChemAxon modules as dependencies.

If you had a problem with resolving the ojdbc8 Oracle JDBC driver but you do not want to use Oracle then omitting the driver solves the problem. To omit ojdbc8 add this setting to the build.gradle file:

configurations.all {
   exclude group: 'com.oracle.jdbc', module: 'ojdbc8'
}

Quickstart Projects

Gradle

A simple, self-contained quickstart project example using Gradle:

MSketchGradleQuickstart.zip

Maven

A simple, self-contained quickstart project example using Apache Maven:

MSketchMavenQuickstart.zip

Top Level Modules

To integrate a product, you only need to add its top-level module as a dependency, all required modules will be downloaded transitively (with the exception of the module naming which also needs to be added separately).

ProductTop-level module name in the repository
Marvinmarvin-app
JChemjchem-main

Example Projects

JKlustor Web Example

An open-source API usage example for JKlustor, which uses ChemAxon's Maven Repository. It is available on GitHub: https://github.com/ChemAxon/jklustor-web-example/