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>
'settings.xml' is normally located in your .m2 folder that is in your home dir. If it does not exist, which is the default, then you can find a canonical empty settings.xml in the Maven Settings Reference.
In this file add the GitHub server and a personal access token (PAT) that you generated on GitHub:
<servers>
<server>
<id>github</id>
<username>donduck</username>
<password>313___PAT__c2a</password>
</server>
</servers>
Note that currently no public/anonymous access is possible (see this discussion). Create a PAT for downloading.