neatonk / lein-deploy-deps

Deploy project dependencies to a remote repo
2 stars 4 forks source link

Tricky to use; maybe confusion with snapshots and releases #2

Open t-jones opened 11 years ago

t-jones commented 11 years ago

I was trying to deploy a set of dependencies to a private nexus repo with the following project.clj:

(defproject test-deploy "0.1.0-SNAPSHOT"
  :description "FIXME: write description"
  :url "http://example.com/FIXME"
  :license {:name "Eclipse Public License"
            :url "http://www.eclipse.org/legal/epl-v10.html"}
  :repositories [["internal-repo" 
                  {:url 
                   "http://munged:8081/nexus/content/repositories/internal-repo"
                   :snapshots false}]]
  :dependencies [[com.hp.search/cos "1.0-hub"]
                 [log4j/daily-rolling-file-appender-ext "1.0-hub"]
                 [javax.mail/javamail "1.0-hub"]
                 [javax.activation/activation "1.0-hub"]
                 [ch.innovation/httpclient "0.3-3-hub"]])

After deploying the first dependency, it returned the message No credentials found for snapshots and prompted for username and password.

Does it always try to deploy snapshots? Is there anyway to disable this behavior? Am I doing anything wrong? I tried a few different project.clj variations.

Thanks!

neatonk commented 11 years ago

The task lein deploy-deps will deploy any snapshot jars to your configured snapshots repo. I'm guessing that you have a transitive dependency on a snapshot version. To find out you can run lein classpath and see if any of the jars listed end in 'SNAPSHOT.jar'.

Please let me know if that helps. There is currently no way to disable deploying snapshot dependencies, but it should be easy to add. I have no plans to work on this right now, but pull requests are welcome.

Let me know what lein classpath turns up.

Thanks!