practicalli / practicalli/clojure

Java and Clojure - use separate projects

Open
#295 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

java interop
Dominant language
Makefile
Stars
117
Forks
36
PR merge metrics
No merged PRs in 30d

Description

writing new java code should be done in a java library and imported into Clojure.

When writing your own Java classes/methods, basically looking to add a lot of Java code to a clojure project, then create a Java project for that code. Generate a jar from the java project and import it into the clojure project as a dependency.
Using this approach the java project can be developed with its own test and test runner, e.g. using Maven or Gradle.

If you are simply calling functions that are imported from Java libraries then only Clojure tests are required, any library should be tested in its own project.

In theory you could use Maven or Gradle to compile a mixed Clojure and Java project, however, it gets very complex very quickly and is not that widely supported. Keeping the development of Java code and Clojure code in separate projects is much simpler.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No file, test, or entry point is named. Start by locating the project guidance for Java and Clojure interoperability and review how Java libraries, separate projects, Maven or Gradle, and Clojure tests are currently documented. Done means the guidance clearly explains when to separate Java code into its own project and how the resulting library is used.

Written by the indexing model from the issue text.

Assessment

Tech stack
clojure, java
Domain
documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.