Visit packagecloud.io/api_token and get your API token before proceeding.
<build>
<extensions>
<extension>
<groupId>io.packagecloud.maven.wagon</groupId>
<artifactId>maven-packagecloud-wagon</artifactId>
<version>0.0.4</version>
</extension>
</extensions>
...
</build>
(We are setting our snapshot and release repositories to the same, feel free to make them different)
<distributionManagement>
<repository>
<id>packagecloud.my_repo_releases</id>
<url>packagecloud+http://packagecloud.dev:3000/testy/my_repo</url>
</repository>
<snapshotRepository>
<id>packagecloud.my_repo_snapshots</id>
<url>packagecloud+http://packagecloud.dev:3000/testy/my_repo</url>
</snapshotRepository>
</distributionManagement>
Make sure the id
matches up with your distributionManagement
id's
<settings>
<servers>
<server>
<id>packagecloud.my_repo_releases</id>
<password>47fd797eff2bbc3b4ea1879de3020269071f6cb006515e93</password>
</server>
<server>
<id>packagecloud.my_repo_snapshots</id>
<password>47fd797eff2bbc3b4ea1879de3020269071f6cb006515e93</password>
</server>
</servers>
</settings>
You can encrypt these passwords by following the instructions for Apache Maven Password Encryption
That's it!