5

I would like to use some of the Clojure interfaces in a Java library project in several situations where it would be useful for my Java classes to implement them. In particular:

Doing this would make my Java library much more user-friendly for Clojure-based users.

However I don't want to import the whole of clojure.jar as a dependency - since it is relatively large and my library is mainly targeted at Java users.

Is there a way to import and develop against the Clojure interfaces without bringing in the rest of Clojure?

2 Answers 2

3

Try it:

  1. unpack the clojure jar
  2. put only the .class you need into a directory named LightweightClojure
  3. run you test appli (test + lib + LightweightClojure)
  4. goto 2 until it works
  5. zip the LightweightClojure directory into LightweightClojure.jar
Sign up to request clarification or add additional context in comments.

Comments

1

If you are using Maven, you can us Maven Shade Plugin's minimize-jar configuration.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.