lambdaisland/open-source

Add `:old-group-id` support

Closed this issue · 1 comments

Currently in bin/proj we set the Maven group-id, e.g. here is the bin/proj for Facai

#!/usr/bin/env bb
(ns proj
  (:require [lioss.main :as lioss]))

(lioss/main
 {:license                  :mpl
  :inception-year           2022
  :description              "The ultimate factory library"
  :group-id                 "com.lambdaisland"
  :version-qualifier        "alpha"
  :aliases-as-optional-deps [:jdbc]})

As explained in #2 , we have a few projects that have previously been released under lambdaisland, where at some point we switched to com.lambdaisland. For these we want to still release a version under lambdaisland, but one that is nothing but an empty jar (only containing the pom), with a single dependency on the com.lambdaisland version. We'll specify this through a new option in bin/proj: :old-group-id.

:group-id "com.lambdaisland"
:old-group-id "lambdaisland"

If this key is present the release process (see lioss.release/do-release), after deploying the main artifact, will create a pom.xml in a temp directory, and then mvn deploy it from there.

We'll need to implement the single-dependency-pom, see lioss.pom/regular-pom and lioss.pom/relocation-pom. This new pom will not have a relocation stanza (we're not actually using Maven relocation support), it will have a <dependencies> section pointing at the previously released artifact.

@kamilwaheed did a good job on this, we're using this for releases of kaocha-cljs.