Skip to content

How To Release Webcam Capture RC to Private Repo

Bartosz Firyn edited this page Jul 13, 2013 · 4 revisions

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 release:update-versions -DautoVersionSubmodules=true -DdevelopmentVersion=0.3.10-RC1
$ mvn clean deploy -P assembly

It will take a while for Maven to upload everything. After all the atrifacts 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 checkout pom.xml webcam-captur*/pom.xml

After everything is done, you will find released artifacts on the FTP server, and through the HTTP depending on the configuration you have:

ftp://ftp.my-domain.com/maven2
http://www.my-domain.com/maven2