
This page describes how to get access to the KOS Java SDK libraries, which are required for writing KOS applications.
You will:
Generate a GitHub personal access token
Put this token in the Maven settings.xml
file
KOS Java libaries reside in our GitHub package registry.
To get started, you’ll need a GitHub account and a "classic" personal access token.
1) Log in to GitHub, creating an account if necessary.
2) Navigate to your personal Settings.
3) Click on the "Developer settings" option.
4) Open "Personal access tokens" and select "Tokens (classic)".
5) Click on the "Generate new token" button and choose "Generate new token (classic)". Enter a note, pick an expiration date, and select the "read:packages" scope. Click the "Generate token" button.
6) Copy the given personal access token and save it to a secure location. You need this in the next step.
1) Using any text editor, open the Maven settings.xml
file. It is located in your <USERNAME>/.m2
directory. If this location doesn’t exist, you may need to install Maven. If the settings.xml file does not exist, create it.
2) Add the following section. Replace USERNAME with your GitHub username and TOKEN with the personal access token created in the preceeding step.
<servers>
<server>
<id>kosdevcode</id>
<username>USERNAME</username>
<password>TOKEN</password>
</server>
</servers>
3) You’ll probably have other configurations in the settings.xml file, but as a minimum it should have:
<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
https://maven.apache.org/xsd/settings-1.0.0.xsd">
<servers>
<server>
<id>kosdevcode</id>
<username>USERNAME</username>
<password>TOKEN</password>
</server>
</servers>
</settings>
4) Save those changes and close the editor.
For related information, see GitHub.