简体   繁体   English

如何让leiningen让我为我的项目命名我想要的东西?

[英]How do I get leiningen to let me name my project what I want?

I'm trying to create a new project with leiningen but I keep getting the message: 我正在尝试用leiningen创建一个新项目,但我不断收到消息:

"Project names containing uppercase letters are not recommended and will be rejected by repositories like Clojars and Central. If you're truly unable to use a lowercase name, please set the LEIN_BREAK_CONVENTION environment variable and try again." “不建议使用包含大写字母的项目名称,并且将被Clojars和Central等存储库拒绝。如果您确实无法使用小写名称,请设置LEIN_BREAK_CONVENTION环境变量并重试。”

I'm runnning it in powershell so I tried setting that environment variable to "true" or 1 but no dice. 我在powershell中运行它所以我尝试将该环境变量设置为“true”或1但没有骰子。 I don't understand how I get leiningen to let me name my project what I want. 我不明白我是如何让莱宁根让我把我的项目命名为我想要的。

You can set the LEIN_BREAK_CONVENTION to any value, including false or nil. 您可以将LEIN_BREAK_CONVENTION设置为任何值,包括false或nil。

Using the Command Prompt on Windows: 在Windows上使用命令提示符:

Run: set LEIN_BREAK_CONVENTION=true , and then create your project. 运行: set LEIN_BREAK_CONVENTION=true ,然后创建项目。

Using PowerShell: 使用PowerShell:

Run: $env:LEIN_BREAK_CONVENTION=true and then create your project with any name you want. 运行: $env:LEIN_BREAK_CONVENTION=true ,然后使用您想要的任何名称创建项目。

You'll get a similar problem if your project name ends in jure , with Leiningen saying to use the LEIN_IRONIC_JURE environment variable. 如果你的项目名称以jure结尾,你会遇到类似的问题,Leiningen说要使用LEIN_IRONIC_JURE环境变量。

There'll be no problem from Clojars, etc. Clojars等没有问题。

I didn't try the LEIN_IRONIC_JURE trick, so not sure if it works. 我没有尝试LEIN_IRONIC_JURE技巧,所以不确定它是否有效。 Instead, after creating the project with a dud name, I went through the created directories and changed all references to the name I wanted. 相反,在使用dud名称创建项目之后,我浏览了创建的目录并更改了对我想要的名称的所有引用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM