pupeno/jar-copier


A Leiningen plugin to copy a jar from your dependencies into your resources.

License: EPL-1.0

Language: Clojure


jar-copier

Join the chat at https://gitter.im/carouselapps/jar-copier

Build Status

jar-copier is a Leiningen plugin to copy a jar from your dependencies into your resources. This is necessary in the case of Java agents for example, which have to be present as jars outside the uberjar.

Usage

In your project.clj, in the :plugins section, add:

Clojars Project

To run this plug in, execute:

$ lein jar-copier

If you want the task to run automatically, which is recommended, add:

:prep-tasks ["javac" "compile" "jar-copier"]

and it'll be invoked every time you build your uberjar. The essential plug-in configuration goes into your project.clj and looks like this:

:jar-copier {:destination "resources/jars"}

:destination specifies where to copy the jars. You can then specify the jars you want to copy in this fashion:

:jar-copier {:jars        '[[org.clojure/clojure "1.7.0"]]
             :destination "resources/jars"}

or, if you have :java-agents in your project, there's a shortcut to just copy them:

:jar-copier {:java-agents true
             :destination "resources/jars"}

They can both be mixed if desired.

A full example using Java agents can be found in proclodo-spa-server-rendering:

(defproject proclodo-spa-server-rendering "0.1.0-SNAPSHOT"
  :dependencies [[org.clojure/clojure "1.7.0"]]
  :plugins [[jar-copier "0.1.0"]]
  :prep-tasks ["javac" "compile" "jar-copier"]
  :java-agents [[com.newrelic.agent.java/newrelic-agent "3.20.0"]]
  :jar-copier {:java-agents true
               :destination "resources/jars"})

Change log

v0.3.0 - 2015-11-18

  • Better reporting of misconfiguration.
  • Thoroughly testing misconfiguration reporting.
  • Added the possibility to manually specify the jars (not java-agents).

v0.2.0 - 2015-09-04

  • Changed the groupId to com.carouselapps
  • Added a test
  • Added travis ci
  • Improved documentation

v0.1.0 - 2015-09-03

  • Initial release supporting copying java-agents.

License

Copyright © 2015 Carousel Apps, Ltd. All rights reserved.

Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.

Project Statistics

Sourcerank 4
Repository Size 20.5 KB
Stars 6
Forks 4
Watchers 2
Open issues 0
Dependencies 0
Contributors 2
Tags 5
Created
Last updated
Last pushed

Top Contributors See all

J. Pablo Fernández The Gitter Badger

Packages Referencing this Repo

com.carouselapps/jar-copier
Copy a jar from your dependencies into your resources.
Latest release 0.3.0 - Updated - 6 stars
jar-copier
Copy a jar from your dependencies into your resources. Delete me
Latest release 0.1.1 - Updated - 6 stars
com.pupeno/jar-copier
Copy a jar from your dependencies into your resources.
Latest release 0.4.0 - Published - 6 stars

Recent Tags See all

0.3.0 November 18, 2015
0.2.0 November 18, 2015
0.1.0 November 18, 2015
v0.2.0 September 04, 2015
v0.1.0 September 03, 2015

Something wrong with this page? Make a suggestion

Last synced: 2016-05-27 14:29:01 UTC

Login to resync this repository