librelist archives

« back to archive

Leiningen, dependency resolution and system properties

Leiningen, dependency resolution and system properties

Chell, Stephen
2014-12-04 @ 05:43
Hi all

I'm fairly new to Clojure/Leiningen and have an issue with dependency 
resolution as follows.

I'm trying to use lein to run a simple Clojure program that has 
dependencies on some java libraries in my local maven repository.   Most 
of these dependencies resolve fine, but in the pom file of one of the 
libraries is a dependency on another project as follows:


The fact that the <classifier> depends on a system property called "env" 
is causing problems.  When I run my clojure program using "lein run", it 
fails with the following:

(Could not find artifact 
in Nexus ( [url removed] ))

The problem is its using the default value for env which is "DEV1", but in
my case I need env to be "DEV6".    When building using maven this is 
easily achieved using a command line argument of -Denv=DEV6.      Is there
a way to specify a java system property via the lein command line?

The problem library is configured as a dependency in my project.clj file 
as follows:

[com.westpac.fxcalypso/fxc-wibfxcalypso "odr-Build1-SNAPSHOT"]

Adding a classifier of "DEV6-conf" as follows ...

[com.westpac.fxcalypso/fxc-wibfxcalypso "odr-Build1-SNAPSHOT" :classifier 

... doesn't help, as that classfier is only applied to the 
fxc-wibfxcalypso library (which causes further problems), not its 

Thanks in advance for any help ...


Confidential communication
Westpac Banking Corporation (ABN 33 007 457 141)
Westpac Institutional Bank is a division of Westpac Banking Corporation