Re: does lein2 use repositories defined in ~/.m2/settings.xml?

2013-02-21 Thread Chas Emerick
On Feb 21, 2013, at 4:28 AM, Michael Klishin wrote:

 2013/2/21 James Xu xumingming64398...@gmail.com
 Thanks! But it sounds odd to me that lein does not use ~/.m2/settings.xml, 
 why this decision?
 
 I wasn't the one who's made this decision but here's my understanding.
 
 Leiningen 2 uses Aether for dependency management. Aether doesn't use 
 ~/.m2/settings.xml
 by default.

Aether actually has no facilities for consuming settings.xml AFAIK — that's 
entirely part of the mvn toolchain, not the underlying libraries.

- Chas

-- 
-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
Clojure group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: does lein2 use repositories defined in ~/.m2/settings.xml?

2013-02-21 Thread Phil Hagelberg

James Xu writes:

 Thanks! But it sounds odd to me that lein does not use ~/.m2/settings.xml,
 why this decision?

Leiningen never explicitly supported settings.xml; it was checked by
accident as an implementation detail due to lein1 using maven-ant-tasks
rather than Aether. But the better answer is that Leiningen isn't Maven,
and supporting some subset of settings.xml without supporting all of it
is confusing.

 Just wondering; if you want to specify an internal nexus repo in one place,
 can you specify it in ~/.lein/profiles.clj ?

It's possible, but highly discouraged. If your project requires certain
repositories in order to operate, you should declare them in project.clj.

Specifying authentication for private repos in the user profile, on the
other hand, is highly recommended.

-Phil

-- 
-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
Clojure group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: does lein2 use repositories defined in ~/.m2/settings.xml?

2013-02-21 Thread David Powell
  Just wondering; if you want to specify an internal nexus repo in one
 place,
  can you specify it in ~/.lein/profiles.clj ?

 It's possible, but highly discouraged. If your project requires certain
 repositories in order to operate, you should declare them in project.clj.

 Specifying authentication for private repos in the user profile, on the
 other hand, is highly recommended.

 -Phil


I can see it being an anti-pattern for open-source projects hosted on the
internet, but the scenario that I am experimenting with is a single nexus
server within an organisation, used to mirror clojars  central, as well as
act as a repository for internal closed-source components.

Putting repos in profiles.clj seems to have the advantage that I'll be able
to override all accesses to central / clojars / etc to go via the nexus
proxy; and I won't have to start hacking at published project.cljs if
infrastructure changes mean that the repo server moves or fragments or
whatever.

Does that sound reasonable?  (I'm a noob at maven infrastructure).

-- 
Dave

-- 
-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
Clojure group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: does lein2 use repositories defined in ~/.m2/settings.xml?

2013-02-21 Thread Chris Jeris
On Thu, Feb 21, 2013 at 12:44 PM, Phil Hagelberg p...@hagelb.org wrote:

 It's possible, but highly discouraged. If your project requires certain
 repositories in order to operate, you should declare them in project.clj.


Just as a data point, we're currently using a profiles.clj on each of our
build agents to declare our internal Nexus repos (including our mirrors of
Maven Central and Clojars), because that is more maintainable for us than
repeating the entire repo declaration in every one of our project.clj
files.  For Maven projects, we can use a parent pom, but there isn't any
corresponding parent project concept for Leiningen, correct?

I experimented a bit with trying to use a Lein middleware to supply the
repo entries, but unless you install the middleware manually, that ends up
begging the question, since Lein has to know where to get the middleware.
-- 
Chris Jeris
cje...@brightcove.com
freenode/twitter/github: ystael

-- 
-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
Clojure group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: does lein2 use repositories defined in ~/.m2/settings.xml?

2013-02-21 Thread Phil Hagelberg

David Powell writes:

 Putting repos in profiles.clj seems to have the advantage that I'll be able
 to override all accesses to central / clojars / etc to go via the nexus
 proxy; and I won't have to start hacking at published project.cljs if
 infrastructure changes mean that the repo server moves or fragments or
 whatever.

Sure; introducing mirrors is different from introducing entirely new
repositories. Mirrors simply streamline and speed things up rather than
providing entirely new artifacts, so they don't really change the
semantics of what you end up with.

-Phil

-- 
-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
Clojure group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.