Consuming Smack - smacklib/dev_smack GitHub Wiki
Consuming Smack using Maven consists of the following configurations:
(1) Add the repository to the distributionManagement element:
<distributionManagement>
...
<repository>
<id>github</id>
<name>GitHub Apache Maven Packages</name>
<url>https://maven.pkg.github.com/smacklib/dev_smack</url>
</repository>
...
</distributionManagement>
(2) Add the actual dependency on smack:
<dependencies>
...
<dependency>
<groupId>micbinz</groupId>
<artifactId>smack</artifactId>
<version>11.398</version>
</dependency>
...
</dependencies>
A valid GitHub account is required. Create one and log in.
Building MMT requires the following applications to be installed on the build system:
The Maven configuration is required to download the Smack maven packages from GitHub.
Generate a personal access token (PAT) on GitHub
- On the main GitHub page, select your avatar (the icon representing your identity) at top right of the page.
- Select Settings (near the bottom of the long list). This opens your personal account page that also shows your account name in the headline.
- Select Developer Settings (again near the bottom).
- In the next page select Personal access tokens' -> 'Tokens (classic)
- A page shows, offering a combo box Generate new token in the top line.
- In the combo box select Generate new token (classic).
- In the following page add a note, configure the token expiration.
- Select the scope read:packages.
- Finally press the Generate token button at the bottom of the page.
- In the following page the new token is shown. Note: The token is shown only one time! Copy the token.
- Extend the Maven config at HOME/.m2/settings.xml by adding the definition below. Configure your Github-account-name and the pat from above.
<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">
<localRepository />
<interactiveMode />
<offline />
<pluginGroups />
<servers>
<server>
<id>github</id>
<username>peteparker</username>
<password>ghp_5yp313IJjYB5AqLinvaLidhveYCyeYg313yoI</password>
</server>
</servers>
<mirrors />
<proxies />
<profiles />
<activeProfiles />
</settings>