Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
502 views
in Technique[技术] by (71.8m points)

clojure - Embed version string from leiningen project in application

I want to be able to query or embed the version string set by the leiningen project and display that value to user. Uses include displaying the version string from the CLI, or as a header in a ring application. Is this possible?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

If you're running inside Leiningen using lein run or the like, it's available as a system property: (System/getProperty "myproject.version"). If you're producing a jar you need to read pom.properties.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...