uberjar task should respect :local-repo and :offline? #770

Closed
floybix opened this Issue Sep 7, 2012 · 6 comments

Projects

None yet

4 participants

@floybix
floybix commented Sep 7, 2012

Hi,

I found that lein uberjar ignores my custom local repo setting and also tries to download when I have :offline? true, e.g.

mv ~/.m2 ~/m2test
echo {:user {:local-repo "$HOME/m2test/repository" :offline? true}} >~/.lein/profiles.clj
lein uberjar
# Retrieving org/jbox2d/jbox2d-library/2.1.2.2/jbox2d-library-2.1.2.2.pom (1k)
#     from http://repo1.maven.org/maven2/
# Retrieving org/jbox2d/jbox2d/2.1.2.2/jbox2d-2.1.2.2.pom (5k)
#     from http://repo1.maven.org/maven2/
#  etc etc
ls ~/.m2/repository/
#  org  quil

lein version
#  Leiningen 2.0.0-preview10 on Java 1.6.0_24 OpenJDK Client VM
@technomancy
Owner

Aha; yeah uberjar has to strip out profiles so that dependencies from :dev etc. don't get in the way, but perhaps a white-list of things to check would be appropriate.

@floybix
floybix commented Jan 2, 2013

Thanks!

I work in a government department with sensitive data, so the network is locked down. This will simplify our internal dev process.

@maratkhafizov

Hi, I got the same problem after lein upgraded to version 2.3.3.

@hyPiRion
Collaborator

@maratkhafizov Could you provide the commands (if any) and the settings you used? Also, does downgrading to any previous version (e.g. lein upgrade 2.2.0) help?

I would suspect this is something related to #1289.

@hyPiRion hyPiRion reopened this Oct 22, 2013
@maratkhafizov

@hyPiRion My profiles.clj:
{:user {:local-repo "mavenrepo" }}
Commands deps, compile work good. But jar and uberjar use ~/.m2/repository as local repo. I found this because I moved my local maven repository to another drive.

I don't know what about the version 2.2.0, but downgrading to version 2.1.2 helps.

@technomancy
Owner

We explicitly whitelist certain keys including :local-repo in leiningen.jar/preprocess-project, so it's probably a bug in there.

@hyPiRion hyPiRion added a commit that closed this issue Oct 31, 2013
@hyPiRion hyPiRion Retain whitelisted keys for the eval/prep phase.
fb532b0 reverted this issue back on, because the whitelisted keys were
ignored for the prep phase.

Fixes #770.
989e12e
@hyPiRion hyPiRion closed this in 989e12e Oct 31, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment