Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Manifest not getting populated with "lein with-profile foo ring uberwar" in 2.5.3 #2041

Closed
fgiasson opened this issue Dec 16, 2015 · 5 comments

Comments

@fgiasson
Copy link
Contributor

I have to add some build information (from Jenkins) into a WAR generated by Leiningen. What I will describe below was working with version 2.5.1 but is not with 2.5.3.

I added that property to the tomcat profile:

  :profiles {:tomcat {:manifest {"Build-Number" #=(eval (System/getenv "BUILD_NUMBER"))}}}

When I was deploying my application using:

lein with-profile tomcat ring uberwar

That information is not added to the manifest file. However, it was working in lein 2.5.1. This :manifest option is also available in the global scope of my defproject such that it works with uberjar (uberjar work as expected).

What I am wondering is if this is a new bug or if there is a new way to define that :manifest property.

@hypirion
Copy link
Collaborator

Could you see if adding ^:leaky onto the profile, like

 :profiles {:tomcat ^:leaky {:manifest {"Build-Number" #=(eval (System/getenv "BUILD_NUMBER"))}}}

works?

@fgiasson
Copy link
Contributor Author

Hi @hypirion,

No, same behavior. By the way, what ^:leaky is supposed to do?

@hypirion
Copy link
Collaborator

If you mark your profile with ^:leaky metadata, then the profile will not be stripped out when the pom and jar files are created. Apparently this doesn't seem to work the same way with lein-ring's uberwar.

I checked lein-ring's issue list, and I couldn't find anything that seems like the issue. The closest I could see was weavejester/lein-ring#163. If that's the issue, then this should be resolved on master via #2001. But I'm not certain, so I would recommend to look through the issue list and post an issue if you cannot find your exact issue there.

It may also be that you do not use the latest lein-ring. That may solve the problem too.

If you have the time, you could try running lein from the master branch and see if the issue is still there.

@fgiasson
Copy link
Contributor Author

Hi @hypirion,

Ok great, didn't thought about looking into lein ring for that. Let me try that tomorrow, and I will comment on what I find then.

Thanks!

@fgiasson
Copy link
Contributor Author

@hypirion thanks for the hint, this solved my issue! So upgrading to the latest lein ring made it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants