librelist archives

« back to archive

:profiles documentation

:profiles documentation

From:
Gregg Reynolds
Date:
2013-08-28 @ 23:34
Hi,

The documentation says "By default the :dev, :provided, :user, :system, and
:base profiles are activated for each task..."

I'm having trouble seeing what the design point is.  If all five are always
active for each task, then why have five distinct default profiles?

Also, the documentation does not indicate what each profile is supposed to
mean.  What is the design point of ":provided", for example?

It also looks like :dev is synonymous with :test, or maybe it was meant to
replace :test but some refs to :test are still in place.  See e.g. pom.clj
"xml-tags", or leiningen/core/project.clj lookup-profile*, which says:

          (when-not (or result (#{:provided :dev :user :test :base :default
                                  :production :system :repl}

So :test and :production (and :repl, etc.) are hardcoded here, but not
documented.  In short, it looks like the documentation is a little out of
sync with the code.

So here's a specific question:  I need to put some jars on the classpath
for the test task only.  I can to this thusly:

  :profiles {:test
             {:dependencies [[com.google.appengine/appengine-api-1.0-sdk
"1.8.3"]
                             [com.google.appengine/appengine-api-stubs
"1.8.3"]
                             [com.google.appengine/appengine-testing
"1.8.3"]]}})

But it also works if I use :dev instead of :test.  So my question is: what
is the correct way to go?

I'd be happy to try to tweak the documentation if somebody can provide some
guidance.

Thanks,

Gregg