[英]pom.xml maven properties in leiningen project.clj
I use the $ lein pom
command to genereate a maven pom.xml
from a Leiningen project.clj
file. 我使用
$ lein pom
命令从Leiningen project.clj
文件中生成maven pom.xml
。 I do that because I have Java source files in my Clojure project. 我这样做是因为我的Clojure项目中有Java源文件。
I would like to make sure the following maven properties are embedded into the generated pom.xml
file: 我想确保将以下maven属性嵌入到生成的
pom.xml
文件中:
<properties>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
</properties>
I do this by hand now. 我现在手工做这个。 However, I do not want to check in the generated file into version control and I would like to be able to regenerate it any time.
但是,我不想将生成的文件签入版本控制,我希望能够随时重新生成它。 How can I make Leiningen to embed the maven properties in the generated
pom.xml
file every time I generate the pom.xml
? 我怎样才能让Leiningen嵌入在生成的行家性质
pom.xml
每次文件I生成pom.xml
?
Thank you 谢谢
You can add custom pom.xml
entries using :pom-addition
: 您可以使用
:pom-addition
添加自定义pom.xml
条目:pom-addition
:
(defproject ...
...
:pom-addition [:properties
["maven.compiler.source" "1.7"]
["maven.compiler.target" "1.7"]])
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.