I've just deployed an update to the Clojars webapp on the production
site at clojars.org.
A big thank you to Nelson Morris who made these great changes:
* Versions are now browseable! eg http://clojars.org/compojure/versions
* clojars-web now uses pomegranate and aether instead of maven 2. Thus the
snapshot timestamp bug is history.
* We now have a unit and integration test suite using clojure.test and
Nelson's very cool kerodon library.
* Update to more recent versions of many dependencies including
clojure 1.3, leiningen 2 and compojure 1.0.1
* Many other minor code cleanups and bug fixes.
In addition I have reworked the configuration and deployment a bit. The
webapp is now completely usable as a standalone jar.
There are now proper command-line options which you can use as an
alternative to a config file:
lein2 run --repo /var/clojars/repo --db sqlite:///var/clojars/db
Note that if you were running like this:
java -jar clojars.jar 1234 1235
You'll now need to specify --port and --nailgun-port:
java -jar clojars.jar --port 1234 --nailgun-port 1235
The more common options are also available as environment variables for
12factor/Heroku style configuration. See --help for details.
----------------------------------------------------------------------
Phil, on the production site we're now running from uberjars in
~clojars/releases instead of living out of the source checkout.
All production releases now have to be tagged, something I really should
have been doing from the beginning.
There's a new script ~clojars/bin/deploy-clojars which you pass a git
tag number to. It will clone a fresh copy, run the tests, build an
uberjar, update the uberjar symlink and restart clojars-backup.
As usual you can do any manual testing you want and then restart the
primary instance for your changes to be live. To rollback just point
the symlink at the jar of the previous release.
All the configuration for production has been moved to environment
variables set in the upstart script (/etc/init/clojars.conf).
----------------------------------------------------------------------
Please let me know if you encounter any problems.
Alex
Out of curiosity, snapshot timestamp bug?
>> * clojars-web now uses pomegranate and aether instead of maven 2. Thus the
>> snapshot timestamp bug is history.
>
> Out of curiosity, snapshot timestamp bug?
Maven 2 indefinitely caches the "current" time when naming snapshots. So
with a long running process like clojars-web it would keep giving out
the same timestamp for months at a time and just increment a sequence
number.
It was probably done that way on purpose so that if you have a build
that generates multiple jars they'd end up with the same timestamp.
It's a rather hacky way of achieving that though.
You can see the effect on clojars here:
http://clojars.org/repo/aleph/aleph/0.2.0-alpha3-SNAPSHOT/
Notice how a the snapshots all have the same timestamp in their filename
and that it doesn't match the last modified time of the files? You'd
only get a new timestamp when clojars-web was restarted.
That doesn't cause any technical problems as you get a new unique name
from the sequence number, but it is rather confusing for humans. I
eventually put in a nightly cron that restarts clojars-web as a
workaround so you'd at least you'd get a new date even if the time was
wrong.