Search code examples
clojureleiningen

Looking for Leiningen release task automation for parent projects with subprojects


We build our application suite out of libraries and standalone uberjars, using Leiningen to build. We use the lein-parent plugin and have a parent project that sets versions for 3rd party dependencies and for our own libraries.

Our team is distributed and builds locally, using a central Artifactory for libraries. Consequently, we tend to set library versions to -SNAPSHOT qualifiers to ensure that everyone who thinks they're working at the head of the main branch is getting the latest library jars. The parent project itself has a -SNAPSHOT qualifier, since there is constant churn in 3rd party dependencies as we (for example) mitigate code vulnerabilities as found by tooling such as the OWASP vulnerability checker.

At release time, we need to freeze all this: the -SNAPSHOT qualifiers need to come off the parent project and each of the child projects. The lein release tooling does this just fine. Commands like lein release take care of project versions, and lein change :parent-project:coords set [groupid/artifactid "version"] can take care of references in child projects to the parent.

However, we can't find any Leiningen tooling that can automatically go into the :managed-dependencies vector of the parent project and update versions of specified child projects. It appears that lein change can only deal with values that are keyed in project maps.

Has anyone found a workable solution for managing interdependencies between parent and child projects during release tasks?


Solution

  • Leiningen 2.9.9-SNAPSHOT now supports editing the version of a specific dependency in a project's :dependencies or :managed-dependencies vector, in a parent or child project.