-
Notifications
You must be signed in to change notification settings - Fork 1.1k
How To Release Webcam Capture RC to Private Repo
Define your server in the ~/.m2/settings.xml
(FTP user name and password):
<servers>
<server>
<id>my-ftp-repo</id>
<username>ftp-user@my-domain.com</username>
<password>ftp-secret-password</password>
</server>
</servers>
In the root POM, find the following:
<distributionManagement>
<repository>
<id>${repo-id}</id>
<url>${repo-url}</url>
</repository>
</distributionManagement>
And replace ${repo-id}
with the my-ftp-repo
from settings.xml
file. The ${repo-url}
should be replaced with the FTP address (with optional sub directories) of where artifacts should be deployed. In the example below the maven2
directory will be used - please note that it must exists on the FTP server.
<distributionManagement>
<repository>
<id>my-ftp-repo</id>
<url>ftp://ftp.my-domain.com/maven2</url>
</repository>
</distributionManagement>
To perform deploy you first have to update the release version. Assume we will perform private first release candidate (also known as RC) for version 0.3.10 (it will be 0.3.10-RC1).
$ cd webcam-capture
$ mvn versions:set -DnewVersion=0.3.10-RC1
$ mvn clean deploy -P assembly
NOTE! The deployment will not succeed if there is a -SNAPSHOT
string in the version name. In this case all the artifacts will be send to Sonatype Snapshot Repository.
Please be patient since it will take a while for Maven to upload everything. After all the artifacts are deployed, you have to revert the version change and go back to SNAPSHOT. Do that by restoring POM files to the previous state:
$ git reset --hard
After everything is done, you will find released artifacts and respective POMs on the FTP server. Depending on the distribution management configuration one can download them through the FTP/HTTP:
ftp://ftp.my-domain.com/maven2
http://www.my-domain.com/maven2
After deployment is done it's usually good to perform git tag
to have better insight of what and when has been deployed.
$ git tag -a webcam-capture-parent-0.3.10-RC1 -m '1st Release Candidate for Webcam Capture v0.3.10'
$ git push --tags
In case of Github repository one can also add release on repository releases page.