Public Repository

Introduction

ChemAxon provides a public Maven repository at https://hub.chemaxon.com for integrating our products and modules. It is designed for integrators and resellers, but is available for any registered ChemAxon user.

In order to use this repository, you should follow these two steps:

  • Register a ChemAxon Pass account, unless you already have one. (The email associated with the Pass registration will serve as the username credential.)

  • Use the ChemAxon Pass account to log in to https://hub.chemaxon.com and generate an API key. (This API key will serve as the password credential.)

These steps are described in detail in the followings.

How to Register a ChemAxon Account

If you have already registered on www.chemaxon.com, then you are done. Otherwise, you should follow these steps to register:

  1. Go to https://pass.chemaxon.com/sign-up, which is also available from ChemAxon site.

    images/download/attachments/51037574/pass_register_1.png

  2. On the Pass registration form, enter your details. The specified email address will serve as the username credential to access the Maven repository.

    images/download/attachments/51037574/pass_register_2.png

  3. After that, an email is sent to you containing a link to activate your ChemAxon Pass account.

    images/download/attachments/51037574/pass_register_3.png

  4. On the activation page, you need to specify a password.

    images/download/attachments/51037574/pass_register_4.png

  5. Finally, your ChemAxon Pass account is ready to use.

    images/download/attachments/51037574/pass_register_5.png

How to Generate an API Key

  1. Go to https://hub.chemaxon.com and sign in using GATE authentication. Do not enter any user name or password on this page.

    images/download/attachments/51037574/hub_apikey_1.png

  2. Then you are redirected to the GATE login page where you can use your Pass account (email address and password specified during Pass registration, see above).

    images/download/attachments/51037574/hub_apikey_2.png

  3. After a successfull login, click on your email address at the top right part of the site and select "Edit Profile" from the dropdown list.

    images/download/attachments/51037574/hub_apikey_3.png

  4. In the "Authentication Settings" section, click on the cog wheel icon next to the input field called "API Key". If you already have an API Key (the input field is filled and there are two more icons next to the cog wheel icon), you can skip this step.

    images/download/attachments/51037574/hub_apikey_4.png

  5. The API key can be revealed by clicking on the eye icon .

    images/download/attachments/51037574/hub_apikey_5.png

  6. Copy the API key to use as the password credential during build.

    images/download/attachments/51037574/hub_apikey_6.png

How to Congfigure Your Project

Gradle

If you would like to use Gradle as your build tool, you can follow these instructions to access ChemAxon 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.

artifactory_user=[the email address coresponding to your ChemAxon Pass account, see above]
artifactory_password=[the API key you generated, see above]
artifactory_contextUrl=https://hub.chemaxon.com/artifactory

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

repositories {
maven {
url hubRepositoryUrl
credentials {
username = hubUser
password = hubPassword
}
}
}

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

npm

The ChemAxon npm repository with frequent releases is hosted on hub.chemaxon.com under the npm-local repository, which also includes with a virtual cache to the official npmjs.org public registry. If you'd like to install a ChemAxon npm package, you can follow the "Set me up" guide of Artifactory for the npm repository. The guide will walk you through obtaining the authentication token and configuration for the repository.

curl -o ~/.npmrc -u<email address>:<api key> https://hub.chemaxon.com/artifactory/api/npm/auth
npm config set registry https://hub.chemaxon.com/artifactory/api/npm/npm

images/download/attachments/51037574/Screen_Shot_2017-12-15_at_9.51.16.png

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 dependency, all required modules will be downloaded transitively (with the exception of the module naming which also needs to be added separately).

Product

Top-level module name in repository

Marvin

marvin-app

JChem

jchem-main

Example Projects

JKlustor Web Example

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