Skip to content
Pre-release
Pre-release

@alexarchambault alexarchambault released this Mar 20, 2020 · 5 commits to master since this release

Manifest JAR -based launchers

The bootstrap command can now generate launchers that rely on the Class-Path field of manifests to set the launcher classpath. This requires all the required JARs to be already in the coursier cache, and these launchers can typically only be run on the current machine, as they hardcode the path to the cache.

Example

$ cs bootstrap coursier -o coursier --manifest-jar
$ ls -lh coursier
-rwxr-xr-x  1 user  group   2,1K 20 mar 16:14 coursier
$ unzip -l coursier
  Length      Date    Time    Name
---------  ---------- -----   ----
     7939  03-20-2020 16:14   META-INF/MANIFEST.MF
---------                     -------
     7939                     1 file

In the generated JAR, META-INF/MANIFEST.MF contains things like

Manifest-Version: 1.0
Class-Path: /Users/alexandre/.coursier/cache/v1/https/repo1.maven.org/
 maven2/io/get-coursier/coursier-cli_2.12/2.0.0-RC6-10/coursier-cli_2.
 12-2.0.0-RC6-10.jar /Users/alexandre/.coursier/cache/v1/https/repo1.m
 aven.org/maven2/org/scala-lang/scala-library/2.12.10/scala-library-2.
 12.10.jar …
Main-Class: coursier.cli.Coursier

Publish the coursier-launcher module in 2.11

This module allows to generate bootstrap, assemblies, etc. The bootstrap command relies on it. It has no dependencies, so it's straightforward to compile it and publish it in 2.11 too. (The 2.11 version should be used by ammonite-runner in particular.)

Assets 14
You can’t perform that action at this time.