Add a lot of `s'es.
This commit is contained in:
parent
b3bfcda8c5
commit
4874c7bf0f
10 changed files with 60 additions and 59 deletions
|
@ -16,7 +16,7 @@
|
|||
- Further reduce/simplify/refactor away from batch-file idioms toward idiomatic PowerShell.
|
||||
|
||||
.Link
|
||||
http://leiningen.org/
|
||||
https://leiningen.org/
|
||||
#>
|
||||
|
||||
#require -version 3
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
# Deploying Libraries
|
||||
|
||||
Getting your library into [Clojars](http://clojars.org) is fairly
|
||||
Getting your library into [Clojars](https://clojars.org) is fairly
|
||||
straightforward as is documented near the end of
|
||||
[the Leiningen tutorial](https://github.com/technomancy/leiningen/blob/stable/doc/TUTORIAL.md).
|
||||
However, deploying elsewhere is not always that straightforward.
|
||||
|
@ -69,14 +69,14 @@ N.B. SCP deploys to Clojars are no longer supported.
|
|||
### S3
|
||||
|
||||
If you don't already have a server running,
|
||||
[Amazon S3](http://aws.amazon.com/s3/) is a low-maintenance choice;
|
||||
[Amazon S3](https://aws.amazon.com/s3/) is a low-maintenance choice;
|
||||
you can deploy to S3 buckets using the
|
||||
[S3 wagon private](https://github.com/technomancy/s3-wagon-private) plugin.
|
||||
|
||||
### Artifactory/Nexus/Archiva
|
||||
|
||||
The most full-featured and complex route is to run a full-fledged
|
||||
repository manager. Both [Artifactory](http://www.jfrog.com/open-source/#os-arti), [Archiva](http://archiva.apache.org/) and
|
||||
repository manager. Both [Artifactory](https://www.jfrog.com/open-source/#os-arti), [Archiva](https://archiva.apache.org/) and
|
||||
[Nexus](http://nexus.sonatype.org/) provide this. They also proxy to
|
||||
other repositories, so you can set `^:replace` metadata on
|
||||
`:repositories` in project.clj, and dependency downloads will speed up
|
||||
|
@ -88,8 +88,8 @@ listing in project.clj. Artifactory, Archiva and Nexus offer separate repositori
|
|||
for snapshots and releases, so you'll want two entries for them:
|
||||
|
||||
```clj
|
||||
:repositories [["snapshots" "http://blueant.com/archiva/snapshots"]
|
||||
["releases" "http://blueant.com/archiva/internal"]]
|
||||
:repositories [["snapshots" "https://blueant.com/archiva/snapshots"]
|
||||
["releases" "https://blueant.com/archiva/internal"]]
|
||||
```
|
||||
|
||||
If you are are deploying to a repository that is _only_ used for deployment
|
||||
|
@ -100,13 +100,13 @@ Deployment-only repositories useful across a number of locally developed
|
|||
projects may also be specified in the `:user` profile in `~/.lein/profiles.clj`:
|
||||
|
||||
```clj
|
||||
{:user {:deploy-repositories [["internal" "http://blueant.com/archiva/internal"]]}}
|
||||
{:user {:deploy-repositories [["internal" "https://blueant.com/archiva/internal"]]}}
|
||||
```
|
||||
|
||||
### Other Non-standard Repository Protocols
|
||||
|
||||
If you are deploying to a repository that doesn't use one of the
|
||||
standard protocols (`file:`, `http:`, `https:`), you may need to
|
||||
standard protocols (`file:` or `https:`), you may need to
|
||||
provide a wagon factory for that protocol. You can do so by specifying
|
||||
the wagon provider as a plugin dependency:
|
||||
|
||||
|
@ -135,7 +135,7 @@ you'll usually need to provide a `:username` and `:password` (for a repository)
|
|||
or `:passphrase` (for GPG). Leiningen will prompt you for a password if you
|
||||
haven't set up credentials, but it's convenient to set it so you don't have to
|
||||
re-enter it every time you want to deploy. You will need
|
||||
[gpg](http://www.gnupg.org/) installed and a key pair configured. If
|
||||
[gpg](https://www.gnupg.org/) installed and a key pair configured. If
|
||||
you need help with either of those, see the
|
||||
[GPG guide](https://github.com/technomancy/leiningen/blob/stable/doc/GPG.md).
|
||||
|
||||
|
@ -146,7 +146,7 @@ maps, Leiningen will decrypt `~/.lein/credentials.clj.gpg` and use that to find
|
|||
the proper credentials for the given repository.
|
||||
|
||||
```clj
|
||||
:repositories [["releases" {:url "http://blueant.com/archiva/internal"
|
||||
:repositories [["releases" {:url "https://blueant.com/archiva/internal"
|
||||
:creds :gpg}]]
|
||||
```
|
||||
|
||||
|
@ -171,7 +171,7 @@ launches, but with `gpg-agent` you only have to enter your passphrase
|
|||
periodically; it will keep it cached for a given period.
|
||||
|
||||
Note to windows users: Be sure to download the full version of
|
||||
[Gpg4win](http://gpg4win.org/download.html) and
|
||||
[Gpg4win](https://gpg4win.org/download.html) and
|
||||
select GPA for installation. You then need to run
|
||||
`gpg-connect-agent /bye` from the command line before starting lein.
|
||||
|
||||
|
@ -199,7 +199,7 @@ You can control which environment variable is looked up for each value
|
|||
by using a namespaced keyword, like so:
|
||||
|
||||
```clj
|
||||
:repositories [["releases" {:url "http://blueant.com/archiva/internal"
|
||||
:repositories [["releases" {:url "https://blueant.com/archiva/internal"
|
||||
:username :env/archiva_username
|
||||
:password :env/archiva_password}]]
|
||||
```
|
||||
|
@ -208,7 +208,7 @@ Finally, you can opt to load credentials from the environment _or_ GPG credentia
|
|||
by using a vector of `:gpg` and `:env/*` values to define the priority of each:
|
||||
|
||||
```clj
|
||||
:repositories [["releases" {:url "http://blueant.com/archiva/internal"
|
||||
:repositories [["releases" {:url "https://blueant.com/archiva/internal"
|
||||
:username [:gpg :env/archiva_username]
|
||||
:password [:gpg :env/archiva_password]}]]
|
||||
```
|
||||
|
@ -334,7 +334,7 @@ for example: `["vcs" "tag" "v" "--no-sign"]` or `["vcs" "tag" "--no-sign"]`.
|
|||
## Deploying to Maven Central
|
||||
|
||||
Deploying your libraries and other artifacts to [Maven
|
||||
Central](http://search.maven.org/) is often desirable. Most tools that
|
||||
Central](https://search.maven.org/) is often desirable. Most tools that
|
||||
use the Maven repository format (including Leiningen, Gradle, sbt, and
|
||||
Maven itself) include Maven Central or one of its mirrors as a default
|
||||
repository for resolving project dependencies. So deploying your
|
||||
|
|
|
@ -17,7 +17,9 @@
|
|||
for background.
|
||||
|
||||
**Q:** How should I pick my version numbers?
|
||||
**A:** Use [semantic versioning](http://semver.org).
|
||||
**A:** Use [semantic versioning](http://semver.org) to communicate
|
||||
intentions to downstream users of your library, but don't make
|
||||
assumptions that libraries you use stick with it consistently.
|
||||
|
||||
**Q:** What if my project depends on jars that aren't in any repository?
|
||||
**A:** You will need to get them in a repository. The
|
||||
|
@ -87,7 +89,7 @@
|
|||
the proxy. This is a list of patterns separated by `|` and may start or end with
|
||||
a `*` for wildcard, e.g. `localhost|*.mydomain.com`.
|
||||
For Leiningen 1.x versions, see the instructions for
|
||||
[configuring a Maven proxy](http://maven.apache.org/guides/mini/guide-proxies.html)
|
||||
[configuring a Maven proxy](https://maven.apache.org/guides/mini/guide-proxies.html)
|
||||
using `~/.m2/settings.xml`.
|
||||
|
||||
**Q:** What can be done to speed up launch?
|
||||
|
|
20
doc/GPG.md
20
doc/GPG.md
|
@ -29,9 +29,9 @@
|
|||
# Using GPG
|
||||
|
||||
This is an introduction to setting up and using
|
||||
[GPG](http://www.gnupg.org/) keys with
|
||||
[Leiningen](http://leiningen.org) to sign artifacts for publication to
|
||||
[Clojars](http://clojars.org/) and to encrypt repository credentials.
|
||||
[GPG](https://www.gnupg.org/) keys with
|
||||
[Leiningen](https://leiningen.org) to sign artifacts for publication to
|
||||
[Clojars](https://clojars.org/) and to encrypt repository credentials.
|
||||
|
||||
There are two versions of GPG available: v1.x and v2.x. For our
|
||||
purposes, they are functionally equivalent. Package managers generally
|
||||
|
@ -43,11 +43,11 @@ macOS), and has only been tested under v1.x.
|
|||
|
||||
## What is it?
|
||||
|
||||
[GPG](http://www.gnupg.org/) (or Gnu Privacy Guard) is a set of tools
|
||||
[GPG](https://www.gnupg.org/) (or Gnu Privacy Guard) is a set of tools
|
||||
for cryptographic key creation/management and encryption/signing of
|
||||
data. If you are unfamiliar with the concepts of public key
|
||||
cryptography, this
|
||||
[Wikipedia entry](http://en.wikipedia.org/wiki/Public-key_cryptography)
|
||||
[Wikipedia entry](https://en.wikipedia.org/wiki/Public-key_cryptography)
|
||||
serves as a good introduction.
|
||||
|
||||
An important concept to understand in public key cryptography is that
|
||||
|
@ -82,14 +82,14 @@ available via:
|
|||
There are several options here, depending on which package manager you
|
||||
have installed (if any):
|
||||
|
||||
1. via [homebrew](http://mxcl.github.com/homebrew/): `brew install gnupg2`
|
||||
2. via [macports](http://www.macports.org/): `port install gnupg2`
|
||||
1. via [homebrew](https://mxcl.github.com/homebrew/): `brew install gnupg2`
|
||||
2. via [macports](https://www.macports.org/): `port install gnupg2`
|
||||
3. via a [binary installer](https://www.gpgtools.org/installer/index.html)
|
||||
(this installs gpg2 as gpg)
|
||||
|
||||
### Windows
|
||||
|
||||
[GPG4Win](http://gpg4win.org/) provides a binary installer that
|
||||
[GPG4Win](https://gpg4win.org/) provides a binary installer that
|
||||
provides some possibly useful GUI tools in addition to providing the
|
||||
`gpg` command.
|
||||
|
||||
|
@ -245,9 +245,9 @@ repository specification in your project definition:
|
|||
(defproject ham-biscuit "0.1.0"
|
||||
...
|
||||
:deploy-repositories
|
||||
[["releases" {:url "http://blueant.com/archiva/internal/releases"
|
||||
[["releases" {:url "https://blueant.com/archiva/internal/releases"
|
||||
:signing {:gpg-key "2ADFB13E"}}]
|
||||
["snapshots" "http://blueant.com/archiva/internal/snapshots"]]
|
||||
["snapshots" "https://blueant.com/archiva/internal/snapshots"]]
|
||||
...)
|
||||
|
||||
## Troubleshooting
|
||||
|
|
|
@ -79,7 +79,7 @@ sources use features up to JDK 6 and target JVM is also version 6:
|
|||
:javac-options ["-target" "1.6" "-source" "1.6"])
|
||||
```
|
||||
|
||||
Leiningen 2 and later versions uses the [JDK compiler API](http://docs.oracle.com/javase/7/docs/technotes/guides/javac/index.html) to compile Java sources.
|
||||
Leiningen 2 and later versions uses the [JDK compiler API](https://docs.oracle.com/javase/7/docs/technotes/guides/javac/index.html) to compile Java sources.
|
||||
|
||||
Failing to specify the target version will lead JDK compiler to target whatever JDK
|
||||
Leiningen is running on. It is a good practice to explicitly specify target JVM
|
||||
|
@ -93,7 +93,7 @@ reference Java sources may also provide Clojure code for the generated
|
|||
sources to use.
|
||||
|
||||
Any Clojure code referenced by Java sources must be
|
||||
[AOT compiled](http://clojure.org/compilation) to make it available to
|
||||
[AOT compiled](https://clojure.org/compilation) to make it available to
|
||||
the Java compiler. Similarly, the Java classes produced by `javac`
|
||||
must be available for Clojure code that depends on it. This results
|
||||
in steps of `compile` `javac` `compile`, whereas the default task
|
||||
|
|
|
@ -195,7 +195,7 @@ this purpose. It accepts a project argument as well as a form to
|
|||
evaluate, and the final (optional) argument is another form called
|
||||
`init` that is evaluated up-front before the main form. This may be
|
||||
used to require a namespace earlier in order to avoid the
|
||||
[Gilardi Scenario](http://technomancy.us/143).
|
||||
[Gilardi Scenario](https://technomancy.us/143).
|
||||
|
||||
Inside the `eval-in-project` call the project's own classpath will be
|
||||
active and Leiningen's own internals and plugins will not be
|
||||
|
@ -453,8 +453,7 @@ If your project doesn't need to use `eval-in-project` at all, it
|
|||
should be relatively easy to port; it's just a matter of updating any
|
||||
references to Leiningen functions which may have moved. All
|
||||
`leiningen.utils.*` namespaces have gone away, and `leiningen.core`
|
||||
has become `leiningen.core.main`. For a more thorough overview see the
|
||||
[published documentation on leiningen-core](http://technomancy.github.com/leiningen/).
|
||||
has become `leiningen.core.main`.
|
||||
|
||||
Plugins that do use `eval-in-project` should just be aware that the
|
||||
plugin's own dependencies and source will not be available to the
|
||||
|
@ -588,7 +587,7 @@ the argument list so that the `-main` function running inside the
|
|||
project code gets access to it.
|
||||
|
||||
The vast majority of these cases are already covered by
|
||||
[existing plugins](http://wiki.github.com/technomancy/leiningen/plugins),
|
||||
[existing plugins](https://github.com/technomancy/leiningen/wiki/plugins),
|
||||
but if you have a case that doesn't exist and for some reason can't
|
||||
spin it off into its own separate plugin, you can enable this behavior
|
||||
by placing the `foo.clj` file defining the new task in
|
||||
|
@ -615,7 +614,7 @@ proper plugin.
|
|||
## Have Fun
|
||||
|
||||
Please add your plugin to [the list on the
|
||||
wiki](http://wiki.github.com/technomancy/leiningen/plugins) once it's ready.
|
||||
wiki](https://github.com/technomancy/leiningen/wiki/plugins) once it's ready.
|
||||
|
||||
Hopefully the plugin mechanism is simple and flexible enough to let
|
||||
you bend Leiningen to your will.
|
||||
|
|
|
@ -114,8 +114,8 @@ generated project will contain a file named `README.md` where the header is
|
|||
`liquid-cool-app`.
|
||||
|
||||
[stencil]: https://github.com/davidsantiago/stencil
|
||||
[Mustache]: http://mustache.github.io/
|
||||
[mustache-manual]: http://mustache.github.io/mustache.5.html
|
||||
[Mustache]: https://mustache.github.io/
|
||||
[mustache-manual]: https://mustache.github.io/mustache.5.html
|
||||
|
||||
#### A warning about Mustache tag delimiters
|
||||
Clojure syntax can conflict with the default mustache tag delimiter. For
|
||||
|
|
|
@ -46,7 +46,7 @@ It offers various project-related tasks and can:
|
|||
* run the project (if the project isn't a library)
|
||||
* generate a maven-style "pom" file for the project for interop
|
||||
* compile and package projects for deployment
|
||||
* publish libraries to repositories such as [Clojars](http://clojars.org)
|
||||
* publish libraries to repositories such as [Clojars](https://clojars.org)
|
||||
* run custom automation tasks written in Clojure (leiningen plug-ins)
|
||||
|
||||
If you come from the Java world, Leiningen could be thought of as
|
||||
|
@ -144,7 +144,7 @@ named with underscores instead since the JVM has trouble loading files
|
|||
with dashes in the name. The intricacies of namespaces are a common
|
||||
source of confusion for newcomers, and while they are mostly outside
|
||||
the scope of this tutorial you can
|
||||
[read up on them elsewhere](http://blog.8thlight.com/colin-jones/2010/12/05/clojure-libs-and-namespaces-require-use-import-and-ns.html).
|
||||
[read up on them elsewhere](https://8thlight.com/blog/colin-jones/2010/12/05/clojure-libs-and-namespaces-require-use-import-and-ns.html).
|
||||
|
||||
## project.clj
|
||||
|
||||
|
@ -153,9 +153,9 @@ Your `project.clj` file will start off looking something like this:
|
|||
```clj
|
||||
(defproject my-stuff "0.1.0-SNAPSHOT"
|
||||
:description "FIXME: write description"
|
||||
:url "http://example.com/FIXME"
|
||||
:url "https://example.com/FIXME"
|
||||
:license {:name "Eclipse Public License"
|
||||
:url "http://www.eclipse.org/legal/epl-v10.html"}
|
||||
:url "https://www.eclipse.org/legal/epl-v10.html"}
|
||||
:dependencies [[org.clojure/clojure "1.8.0"]]
|
||||
:main ^:skip-aot my-stuff.core
|
||||
:target-path "target/%s"
|
||||
|
@ -186,7 +186,7 @@ Published JVM libraries have *identifiers* (artifact group, artifact id) and
|
|||
|
||||
### Artifact IDs, Groups, and Versions
|
||||
|
||||
You can [search Clojars](http://clojars.org/search?q=clj-http) using
|
||||
You can [search Clojars](https://clojars.org/search?q=clj-http) using
|
||||
its web interface or via `lein search $TERM`. On the Clojars page for
|
||||
`clj-http` at the time of this writing it shows this:
|
||||
|
||||
|
@ -251,11 +251,11 @@ familiar with Perl's CPAN, Python's Cheeseshop (aka PyPi), Ruby's
|
|||
rubygems.org, or Node.js's NPM, it's the same thing. Leiningen reuses
|
||||
existing JVM repository infrastructure. There are several popular
|
||||
open source repositories. Leiningen by default will use two of them:
|
||||
[clojars.org](http://clojars.org) and
|
||||
[Maven Central](http://search.maven.org/).
|
||||
[clojars.org](https://clojars.org) and
|
||||
[Maven Central](https://search.maven.org/).
|
||||
|
||||
[Clojars](https://clojars.org/) is the Clojure community's centralized
|
||||
maven repository, while [Central](http://search.maven.org/) is for the
|
||||
maven repository, while [Central](https://search.maven.org/) is for the
|
||||
wider JVM community.
|
||||
|
||||
You can add third-party repositories by setting the `:repositories` key
|
||||
|
@ -340,7 +340,7 @@ work without checkouts before you push or merge.
|
|||
Leiningen supports searching remote Maven repositories for matching
|
||||
jars with the command `lein search $TERM`. The first time `lein search`
|
||||
is run, a set of indices are downloaded. Once this is finished, the query
|
||||
is evaluated as a [Lucene search](http://www.lucenetutorial.com/lucene-query-syntax.html).
|
||||
is evaluated as a [Lucene search](https://www.lucenetutorial.com/lucene-query-syntax.html).
|
||||
This allows for simple string matching or strings prefixed with one of the
|
||||
following operators:
|
||||
|
||||
|
@ -366,7 +366,7 @@ To pass extra arguments to the JVM, set the `:jvm-opts` vector. This will overri
|
|||
:jvm-opts ["-Xmx1g"]
|
||||
```
|
||||
|
||||
If you want to pass [compiler options](http://clojure.org/reference/compilation#_compiler_options) to the Clojure compiler, you also do this here.
|
||||
If you want to pass [compiler options](https://clojure.org/reference/compilation#_compiler_options) to the Clojure compiler, you also do this here.
|
||||
|
||||
```
|
||||
:jvm-opts ["-Dclojure.compiler.disable-locals-clearing=true"
|
||||
|
@ -407,7 +407,7 @@ to run in the context of your project. Since we've added `clj-http` to
|
|||
nil
|
||||
user=> (require '[clj-http.client :as http])
|
||||
nil
|
||||
user=> (def response (http/get "http://leiningen.org"))
|
||||
user=> (def response (http/get "https://leiningen.org"))
|
||||
#'user/response
|
||||
user=> (keys response)
|
||||
(:status :headers :body :request-time :trace-redirects :orig-content-encoding)
|
||||
|
@ -537,9 +537,9 @@ should look like this:
|
|||
```clj
|
||||
(defproject my-stuff "0.1.0-SNAPSHOT"
|
||||
:description "FIXME: write description"
|
||||
:url "http://example.com/FIXME"
|
||||
:url "https://example.com/FIXME"
|
||||
:license {:name "Eclipse Public License"
|
||||
:url "http://www.eclipse.org/legal/epl-v10.html"}
|
||||
:url "https://www.eclipse.org/legal/epl-v10.html"}
|
||||
:dependencies [[org.clojure/clojure "1.8.0"]
|
||||
[clj-http "2.0.0"]]
|
||||
:profiles {:dev {:dependencies [[ring/ring-devel "1.4.0"]]}}
|
||||
|
@ -630,8 +630,8 @@ application. Aside from the obvious uberjar approach, simple
|
|||
programs can be packaged up as tarballs with accompanied shell scripts
|
||||
using the [lein-tar plugin](https://github.com/technomancy/lein-tar)
|
||||
and then deployed using
|
||||
[pallet](http://hugoduncan.github.com/pallet/),
|
||||
[chef](http://opscode.com/chef/), or other mechanisms.
|
||||
[pallet](https://hugoduncan.github.com/pallet/),
|
||||
[chef](https://chef.io/), or other mechanisms.
|
||||
Web applications may be deployed as uberjars using embedded Jetty with
|
||||
`ring-jetty-adapter` or as .war (web application archive) files
|
||||
created by the
|
||||
|
@ -654,7 +654,7 @@ Consider including `~/.m2/repository` in your unit of deployment
|
|||
(tarball, .deb file, etc) along with your project code. It's
|
||||
recommended to use Leiningen to create a deployable artifact in a
|
||||
continuous integration setting. For example, you could have a
|
||||
[Jenkins](http://jenkins-ci.org) CI server run your project's full
|
||||
[Jenkins](https://jenkins-ci.org) CI server run your project's full
|
||||
test suite, and if it passes, upload a tarball to S3. Then deployment
|
||||
is just a matter of pulling down and extracting the known-good tarball
|
||||
on your production servers. Simply launching Leiningen from a checkout
|
||||
|
@ -681,8 +681,8 @@ If your project is a library and you would like others to be able to
|
|||
use it as a dependency in their projects, you will need to get it into
|
||||
a public repository. While it's possible to
|
||||
[maintain your own private repository](https://github.com/technomancy/leiningen/blob/stable/doc/DEPLOY.md)
|
||||
or get it into [Central](http://search.maven.org), the easiest way is
|
||||
to publish it at [Clojars](http://clojars.org). Once you have
|
||||
or get it into [Central](https://search.maven.org), the easiest way is
|
||||
to publish it at [Clojars](https://clojars.org). Once you have
|
||||
[created an account](https://clojars.org/register) there, publishing
|
||||
is easy:
|
||||
|
||||
|
@ -710,7 +710,7 @@ Once that succeeds it will be available as a package on which other
|
|||
projects may depend. For instructions on storing your credentials so
|
||||
they don't have to be re-entered every time, see `lein help
|
||||
deploying`. When deploying a release that's not a snapshot, Leiningen
|
||||
will attempt to sign it using [GPG](http://gnupg.org) to prove your
|
||||
will attempt to sign it using [GPG](https://gnupg.org) to prove your
|
||||
authorship of the release. See the
|
||||
[deploy guide](https://github.com/technomancy/leiningen/blob/stable/doc/DEPLOY.md).
|
||||
for details of how to set that up. The deploy guide includes
|
||||
|
|
|
@ -67,7 +67,7 @@ Leiningenのタスクはleiningen.$TASK名前空間にある$TASKという名前
|
|||
|
||||
### プロジェクトコンテクスト内での評価
|
||||
|
||||
タスクの多くはプロジェクトのコンテクスト内でコードを実行する必要があります。`leiningen.core.eval/eval-in-project`関数はこの目的で使用されます。この関数はプロジェクト引数、評価するフォーム、そして最後にオプションとして、メインフォームの前に評価される、初期化用のフォームをとることができます。この最後のフォームは[ジラルディシナリオ](http://technomancy.us/143)を防ぐために、名前空間を事前にrequireするために用いることができます。
|
||||
タスクの多くはプロジェクトのコンテクスト内でコードを実行する必要があります。`leiningen.core.eval/eval-in-project`関数はこの目的で使用されます。この関数はプロジェクト引数、評価するフォーム、そして最後にオプションとして、メインフォームの前に評価される、初期化用のフォームをとることができます。この最後のフォームは[ジラルディシナリオ](https://technomancy.us/143)を防ぐために、名前空間を事前にrequireするために用いることができます。
|
||||
|
||||
`eval-in-project`関数内ではプロジェクトのクラスパスが有効になっており、Leiningen自体の内部関数とプラグインは無効化されています。
|
||||
|
||||
|
@ -212,7 +212,7 @@ Leiningenの以前のバージョンはプラグインの動き方に違いが
|
|||
|
||||
バージョン1.xと2.xの最も大きな違いは`:dev-dependencies`がなくなったことです。Leiningenのプロセスとプロジェクトのプロセスの両方に存在する依存関係はもはや存在しません。Leiningenは`:plugins`だけを参照し、プロジェクトは`:dependencies`だけを参照します。ただしこれらのマップは現在有効化されているプロファイルによって影響を受ける場合があります。
|
||||
|
||||
もしあなたのプロジェクトが`eval-in-project`を使用する必要が全くないのであれば、移植は比較的容易です。移動したLeiningen関数への参照を更新するだけで十分です。`leiningen.util.*`名前空間内の関数は全てなくなり、`leiningen.core`は`leiningen.core.main`に移動しました。詳細については[leiningen-coreのドキュメント](http://technomancy.github.com/leiningen/)を参考にしてください。
|
||||
もしあなたのプロジェクトが`eval-in-project`を使用する必要が全くないのであれば、移植は比較的容易です。移動したLeiningen関数への参照を更新するだけで十分です。`leiningen.util.*`名前空間内の関数は全てなくなり、`leiningen.core`は`leiningen.core.main`に移動しました。
|
||||
|
||||
`eval-in-project`を使用しているプラグインについては、プラグインの依存関係とソースコードがプロジェクト内では利用可能ではなくなるということに気をつけてください。もしあなたのプラグインが、プラグインとプロジェクトの両方のコンテクストで実行する必要のあるコードを含んでいる場合は、複数のプロジェクトに分割し、それぞれを`:plugins`と`:dependencies`に登録する必要があります。`eval-in-project`の呼び出しで`:dependencies`を挿入する方法については上記の`lein-swank`の例を参照してください。
|
||||
|
||||
|
@ -285,7 +285,7 @@ Leiningenタスクを記述する必要があるのは、例えば`eval-in-proje
|
|||
|
||||
この例ではプロジェクトマップの`:version`フィールドを引数リストに渡すことで、プロジェクト内で実行される`-main`関数が値にアクセスできるようにしています。
|
||||
|
||||
こういった例の多くは[既存のプラグイン](http://wiki.github.com/technomancy/leiningen/plugins)でカバーされているはずですが、もし類似の例が見つからず、何らかの理由で別のブラグインに分離できない場合、`tasks/leiningen/`の下に新しいタスクを定義した`foo.clj`ファイルを作成し、`tasks`を`.lein-classpath`に追加することでこのふるまいを実現することができます。
|
||||
こういった例の多くは[既存のプラグイン](https://github.com/technomancy/leiningen/wiki/plugins)でカバーされているはずですが、もし類似の例が見つからず、何らかの理由で別のブラグインに分離できない場合、`tasks/leiningen/`の下に新しいタスクを定義した`foo.clj`ファイルを作成し、`tasks`を`.lein-classpath`に追加することでこのふるまいを実現することができます。
|
||||
|
||||
```
|
||||
$ ls
|
||||
|
@ -304,7 +304,7 @@ Hello, Foo!
|
|||
|
||||
## 楽しんでください
|
||||
|
||||
あなたのプラグインができあがったら、[Wiki上のリスト](http://wiki.github.com/technomancy/leiningen/plugins)に追加してください。
|
||||
あなたのプラグインができあがったら、[Wiki上のリスト](https://github.com/technomancy/leiningen/wiki/plugins)に追加してください。
|
||||
|
||||
このプラグインシステムが、あなたの思いのままにLeiningenをカスタマイズするための簡単で、柔軟なシステムを提供していることを願っています。
|
||||
|
||||
|
|
|
@ -64,7 +64,7 @@ You can customize your project map further with profiles; see
|
|||
Check https://github.com/technomancy/leiningen/issues to see if your
|
||||
problem is a known issue. If not, please open a new issue on that site
|
||||
or join the mailing list at
|
||||
http://librelist.com/leiningen/. Please include the output of
|
||||
https://www.freelists.org/list/leiningen. Please include the output of
|
||||
.B lein version
|
||||
as well as your
|
||||
.B project.clj
|
||||
|
|
Loading…
Reference in a new issue