If you only want your modified version available locally, you can follow Arthur's process up to the "Test my program" step. This is fine if you're working on an application which you'll package together with its dependencies for deployment (with lein uberjar
, say). You might also want to use Leiningen's checkouts feature to work on your main project and the modified library in parallel (documented in Leiningen's tutorial -- link to the version from the current 2.2.0 release).
If you want your modified version to be accessible in a public Maven repository, the accepted thing to do (indeed, encouraged for this specific use case and no other) is to release a version of the project with the original artefact id and a group id of org.clojars.{your-clojars-account-name}
.
For example, if you wanted to release your own version of project foo
with (defproject foo "upstream-version" ...)
in its project.clj
, you'd change its defproject
form to (defproject org.clojars.kendallb/foo "your-version" ...)
before release. Then you could depend on [org.clojars.kendallb/foo "your-version"]
in your projects.
This way there won't be any conflict either with the original artefact id or any other forks.
As for getting your change merged upstream, Arthur's process is perfectly reasonable.