Updater: quite a few TODOs have been squashed a long time ago

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Fix compiler warnings in the updater

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Updater (cmd-line): avoid static usage

The command-line updater was implemented mainly using static
methods. However, we should reuse it to test the updater in the unit
tests, to simplify the test code dramatically. Hence we need to use
an instance (to set the ImageJ root directory other than by an unsafe
global system property).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Updater (cmd-line): only call System.exit() when run stand-alone

As we want to reuse the CommandLine updater in the unit tests,
we cannot allow it to end the current process except when run as a
stand-alone main class.

We do this by teaching the die() method to exit only when the class
was called from the main() method.

To help the compiler detect unreachable code correctly, we do
not simply throw an exception in embedded mode, but return the
RuntimeException that has to be thrown by the caller.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Updater (cmd-line): add the 'remove-update-site' command

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Updater (cmd-line): upload errors should be fatal

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Expose more attributes of the FilesUploader

This change is needed for the upcoming WebDAV uploader.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Add a WebDAV-based uploader for the ImageJ updater

The idea is to allow more contributors to offer their plugins and
extensions more easily.

To provide a WebDAV-based update site with Apache, make a directory
(preferably in the webspace) and add a file looking roughly like this to
Apache's conf.d/ directory:

	<Location /update>
		DAV on
		AuthType Basic
		AuthName "ImageJ update site"
		AuthUserFile /etc/apache2/webdav-uploaders.db
		Options +Indexes
		<LimitExcept HEAD OPTIONS GET>
			Require valid-user
		</LimitExcept>
	</Location>

Then, initialize the password file like this:

	sudo htpasswd -c /etc/apache2/webdav-uploaders.db rasband

Finally, make sure that the directory referenced in the <Location> tag
is read/writable by the Apache process (typically www-data), and restart
Apache gracefully:

	sudo chown -R www-data.www-data /var/www/update
	sudo apache2ctl graceful

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Make test-jars in all projects

This is a useful feature to be able to re-use test classes in dependencees.

Suggested by Curtis Rueden.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Refactor the updater test

The helper methods can now be reused in dependent projects.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Simplify UpdaterTestUtils class

No need for a 'German' method name, and no need to require a progress
instance, no need to carry around ijRoot and webRoot when a
FilesCollection carries both...

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Add a unit test for WebDAV

This test is only activated if a test WebDAV web space is defined via
the webdav.test.url, webdav.test.username and webdav.test.password
system properties. The web space pointed to is expected to be empty.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>