Skip to content

Commit

Permalink
Merge pull request technomancy#1912 from timlinquist/master
Browse files Browse the repository at this point in the history
Include more details for testing plugins locally in PLUGINS.md
  • Loading branch information
technomancy committed Jun 5, 2015
2 parents 26b4e98 + ef33d8c commit d5ed76a
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion doc/PLUGINS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 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
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
Expand Down

0 comments on commit d5ed76a

Please sign in to comment.