CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/maven-org-springframework-boot--spring-boot-loader-tools

Tools for generating executable JAR/WAR files with embedded containers for Spring Boot applications

Pending
Overview
Eval results
Files

image-packaging.mddocs/

OCI Image Packaging

Specialized packager for exporting fully packaged archives to OCI (Open Container Initiative) images, designed for Docker integration and container deployment workflows.

Capabilities

ImagePackager

Creates packaged images from Spring Boot applications, handling the conversion of JAR/WAR archives to OCI-compatible image layers.

/**
 * Create a new ImagePackager instance
 * @param source the source file to package
 * @param backupFile the backup of the source file to package
 */
public ImagePackager(File source, File backupFile);

/**
 * Create a packaged image using a custom exporter
 * @param libraries the contained libraries
 * @param exporter the exporter used to write the image
 * @throws IOException on IO error
 */
public void packageImage(Libraries libraries, BiConsumer<ZipEntry, EntryWriter> exporter) throws IOException;

Usage Examples:

import org.springframework.boot.loader.tools.ImagePackager;
import org.springframework.boot.loader.tools.Libraries;
import org.springframework.boot.loader.tools.EntryWriter;
import java.io.File;
import java.util.zip.ZipEntry;
import java.util.function.BiConsumer;

// Create image packager with source and backup
File sourceJar = new File("myapp.jar");
File backupJar = new File("myapp.jar.original");
ImagePackager imagePackager = new ImagePackager(sourceJar, backupJar);

// Export to OCI image format
Libraries libraries = /* ... define libraries ... */;
BiConsumer<ZipEntry, EntryWriter> exporter = (entry, writer) -> {
    // Custom logic to write entries to OCI image layers
    System.out.println("Exporting: " + entry.getName());
    // writer.write(outputStream) to write the entry content
};

imagePackager.packageImage(libraries, exporter);

Core Types

public interface EntryWriter {
    void write(OutputStream outputStream) throws IOException;
    default int size() { return -1; }
}

Install with Tessl CLI

npx tessl i tessl/maven-org-springframework-boot--spring-boot-loader-tools

docs

build-integration.md

image-packaging.md

index.md

jar-writing.md

launch-scripts.md

layer-support.md

layout-management.md

library-management.md

main-class-detection.md

repackaging.md

tile.json