@tomjack has joined the channel
@dmuylwyk: The normal lein deploy task won't work there. What you'd do if you want to deploy an uberjar is to use the extended version of lein deploy repo: I think you can do lein do uberjar, pom, deploy repo :project/version :project/uberjar-name pom.xml to deploy the uberjar, but you should probably try it out
You can look at lein help deploy for information
Thanks, @hypirion. I'll give that a try today. If I run into trouble, may I contact you directly with questions?
There's an issue that when putting Akka code into an uberjar (with lein uberjar) it can't find 'akka.version'. Is the solution to this to have :pom-plugins [[org.apache.maven.plugins/maven-shade-plugin 2.2]] in the project file? Well I tried but it didn't help. There's a .conf file at the root level of the uberjar, so it looks like all the merging has been done fine. There's actually no 'akka.version' there. I'm trying to make a Clojure web server by wrapping a Scala/Java/Akka one.
Thanks, @hypirion. Deploying arbitrary artifacts is exactly what I wanted to do.
After creating an uberjar, I can deploy to work as follows:
lein deploy releases com.company.team/myproject 1.0.18 ./target/myproject.jar
I'm having trouble getting it to work with:
lein deploy releases com.company.team/myproject :project/version :project/uberjar-name
or
lein deploy releases com.company.team/myproject :version :uberjar-name
Anyone know how to reference my version number and uberjar-name in command line?
@dmuylwyk: Yeah, it's probably not going to work on the path, but that may be something we could fix
I would consider setting this up as a part of the release task and see if that would work, e.g. replacing ["with-profile" "uberjar" "deploy"] with the three tasks
["uberjar"] ["pom"] ["deploy" "repo" :project/version :project/uberjar-name "pom.xml"]. I believe that should work, I'd say it's a bug otherwise.
@hypirion: That's what I'm testing right now. I've just run this and it seems to do what I need:
;;run all three with release.sh
:aliases {"release-prepare!" ["do"
["vcs" "assert-committed"]
["change" "version" "leiningen.release/bump-version" "release"]
["vcs" "commit"]
["vcs" "tag" "--no-sign"]
["uberjar"]]
"release-deploy!" ["deploy" "releases" "com.mycompany.team/myproject" "1.1.1" "./target/myproject.jar"]
"release-push!" ["do"
["change" "version" "leiningen.release/bump-version"]
["vcs" "commit"]
["vcs" "push"]]}So now I just need to substitute "1.1.1" with :project/version or :version or simply "version".
@hypirion: FYI, I split my release tasks into aliases, which are in turn called by release.sh (lein release-prepare! && release-deploy! && ...) because the interactive prompt for :creds :gpg doesn't work when ran after other (potentially) interactive tasks.
I'm having trouble resolving version properly. With what should I replace the question mark?
["deploy" "releases" "com.mycompany.team/myproject" ? "./target/myproject.jar"]
This is the final piece of the puzzle for me.It should be :project/version
if not then that's a bug
@hypirion: That did it. I must have had a typo the first time I tried.
@hypirion: Thank you so much for your help!
@hypirion: Here's a gist of my final solution: https://gist.github.com/dmuylwyk/e45c3b7fc8eabdd24de2
Nice, good to know it worked!
It meets my needs. The shell script calling aliases in sequence is a little annoying but I haven't been able to get Leiningen to prompt for credentials without it. Thanks again for you help.
@hypirion: You even get a shout out on my reddit post. : )
Updated my gists: https://gist.github.com/dmuylwyk/c5405d83259189bd3007 https://gist.github.com/dmuylwyk/2093a61acf95467466f6 You can find both here: https://www.reddit.com/r/Clojure/comments/48tdlo/troubles_deploying_my_project_to_artifactory/