سؤال

How can I add secret dependencies to a Clojure project on Heroku without putting them in a public repository?

هل كانت مفيدة؟

المحلول

1) Create a folder in the root directory of the project

mkdir repo

2) Install dependencies to the repo using the maven command

mvn org.apache.maven.plugins:maven-install-plugin:2.5.1:install-file -Dfile=path-to-your-artifact-jar -DgroupId=your.groupId -DartifactId=your-artifactId -Dversion=version -Dpackaging=jar -DlocalRepositoryPath=path-to-specific-local-repo

3) Be careful to remove .pom and jar from .gitignore

4) git add repo

5) Edit project.clj and add the line

:local-repo "repo"

Leiningen will look for your secret dependencies in repo and in public repositories for all other dependencies.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top