سؤال

I have "snapshots" and "releases" repos defined in my ~/.lein/profiles.clj in order to avoid having to add these repos to each of the project.clj files in the many lein projects that I develop internally at work:

{:user {:repositories [["snapshots" {:id "NudaySnapshots"
                                     :url "http://nexus.example.com:8081/nexus/content/repositories/snapshots"}]
                       ["releases" {:id "NudayReleases"
                                    :url "http://nexus.example.com:8081/nexus/content/repositories/releases"
                                    :sign-releases false}]]}
 :auth {:repository-auth {#"nexus.example.com" {:username "deployment"
                                               :password "foo bar baz"}}}}

Of course, every time I run lein deploy in one of these internal projects, I get a warning:

:repositories detected in user-level profiles! [:user] 
See https://github.com/technomancy/leiningen/wiki/Repeatability

I would like to suppress this warning, as I have intentionally set things up this way, and these projects cannot be "repeatably" built externally anyway.

Does anyone know how, or must I resort to reading the Leiningen source to figure this out?

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

المحلول

The warning doesn't really have much to do with internal/external builds; the problem is that someone else attempting to build it even within your network will fail unless they replicate your ~/.lein/profiles.clj settings. That's bad.

However if you really insist on doing this, set the environment variable LEIN_SUPPRESS_USER_LEVEL_REPO_WARNINGS, as per https://github.com/technomancy/leiningen/blob/23b0804f672d2c4bb4ee9e37af302840dbe69440/leiningen-core/src/leiningen/core/project.clj#L542.

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