From 073a9552465894741b261d1979f589ba406ef08e Mon Sep 17 00:00:00 2001 From: Tim Linquist Date: Wed, 3 Jun 2015 11:18:45 -0700 Subject: [PATCH 1/2] Update PLUGINS.md --- doc/PLUGINS.md | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/doc/PLUGINS.md b/doc/PLUGINS.md index 6064711b1..dd40eb44d 100644 --- a/doc/PLUGINS.md +++ b/doc/PLUGINS.md @@ -30,7 +30,27 @@ See the `lein-pprint` directory [in the Leiningen source](https://github.com/technomancy/leiningen/tree/stable/lein-pprint) for a sample of a very simple plugin. -During plugin development, having to re-run `lein install` in your +### Local development +When developing the plugin locally you can test the functionality by calling ```lein sample-plugin``` from the root of your plugin project. When you're ready to test it in a separate project you can include it via the following: + +``` +lein install +Created ~/sample-plugin/target/sample-plugin-0.1.0-SNAPSHOT.jar +Wrote ~/sample-plugin/pom.xml +Installed jar and pom into local repo. +``` + +This will build a jar using the :version listed in the plugin's project.clj file (see above for example project.clj) and install it into your local m2 repository (~/.m2/repository) + +After this step completes you can now list your plugin in your separate project with the version outputted from above. This example would look like this: + +``` +... +:plugins [[sample-plugin "0.1.0-SNAPSHOT"]] +... +``` + +During local development, having to re-run `lein install` in your plugin project and then switch to a test project can be very cumbersome. Once you've installed the plugin once, you can avoid this annoyance by creating a `.lein-classpath` file in your test project From ef33d8c18825cb3c1cb5cee08de81ae414c0518b Mon Sep 17 00:00:00 2001 From: Tim Linquist Date: Thu, 4 Jun 2015 16:24:55 -0700 Subject: [PATCH 2/2] Update PLUGINS.md Fixup suggestion to run plugin standalone from root as most plugins don't work this way --- doc/PLUGINS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/PLUGINS.md b/doc/PLUGINS.md index dd40eb44d..05032f5dc 100644 --- a/doc/PLUGINS.md +++ b/doc/PLUGINS.md @@ -31,7 +31,7 @@ See the `lein-pprint` directory for a sample of a very simple plugin. ### Local development -When developing the plugin locally you can test the functionality by calling ```lein sample-plugin``` from the root of your plugin project. When you're ready to test it in a separate project you can include it via the following: +When you're ready to test your plugin in a separate project you can include it via the following (example a plugin named sample-plugin): ``` lein install