Giter VIP home page Giter VIP logo

nixjars's Introduction

NixJARs

This is a set of Nix expressions for building Java packages (JARs). It already includes several common Java libraries and can be easily extended with more. For instance, the top 10 most popular Java libraries (as of March 2024) are all available:

  • junit (as junit4)
  • slf4j-api (as slf4j.api)
  • guava
  • mockito
  • jackson-databind (as jackson.databind)
  • commons-lang3 (as commons-lang)
  • logback-classic (as logback.classic)
  • commons-io
  • lombok
  • gson

To list available packages:

nix-env -qaPf . | sort

TODO: document buildJavaPackage. See examples/basic-project.nix.

TODO: document how to overlay an upgrade for one particular package. See examples/override-package.nix.

Motivation

I am sick of NoClassDefFoundError.

The packages here are guaranteed to meet a minimum level of compatibility since they are compiled from source against each other.

FAQ

Why not build with Ant/Maven/Gradle? All of the projects here have some other build system, and all of those build systems are ignored. The major Java build systems are deeply incompatible with the Nix way of doing things, since they insist on locating dependencies themselves rather than having them provided by an external package manager. See Misadventures Recompiling the Java Ecosystem from Source for more information about why Maven, specifically, would be a nightmare to support.

Java 9 Modules? Yes, modules are supported. However, at the moment the builder does not modularize executables, which means there isn't actually any run-time encapsulation protection. TODO: switch from CLASSPATH to --module-path for executables that support it.

OSGi? No. Most OSGi projects work just fine as normal JARs, which is the way this set of packages prefers to use them.

nixjars's People

Contributors

calvin-l avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.