Does Leiningen read maven settings in .m2/settings.xml?

前端 未结 2 963
刺人心
刺人心 2021-02-08 05:03

I have several additional repositories in ~/.m2/settings.xml. I tried lein search and it doesn\'t find the packages in my repositories. How can I tell

2条回答
  •  耶瑟儿~
    2021-02-08 05:46

    BTW, if you really want to add Maven repositories or mirrors on user profile level (useful for internal company proxy repositories like Nexus, especially if Lein has its usual problems with corporate NTLM proxies), then you can do this in ~/.lein/profiles.clj / %USERPROFILE%\.lein\profiles.clj:

    How to configure leiningen's maven usage?

    In my case, on Windows, it was sufficient to place this :mirrors map in my %USERPROFILE%\.lein\profiles.clj:

    {:user
        {
            :java-cmd "C:\\Program Files\\Java\\jdk1.7.0_09\\bin\\java.exe"
                :plugins [    ]
                :mirrors {
                    #".+"  "http://internal-nexus.example.com/content/groups/public-all/"
                }
        }
    }
    

    `

    The #".+" specifies the name of mirrored repository using pattern syntax that matches all possible names (resulting in mirroring every repository), as described in this Leiningen issue report 271.

提交回复
热议问题