Skip to content
This repository was archived by the owner on May 8, 2020. It is now read-only.
This repository was archived by the owner on May 8, 2020. It is now read-only.

Ensure consistent ordering of jars on classpath #7

Open
@scottfrederick

Description

@scottfrederick

Spring Boot users have had issues with the order that jar files are added to the classpath, and inconsistencies between this order when the app is run in various ways - e.g. from a fat jar archive or from an exploded archive. Spring Boot 2.3.0 addresses this by writing a classpath index file that specifies the order that jars should be loaded and modifying the Boot JarLauncher to use this file when building the claspath.

This buildpack should attempt to use the same classpath ordering when enough information is provided to do so. This could be done in one of two ways:

The buildpack could look for a classpath index in the jar manifest (i.e. Spring-Boot-Classpath-Index: BOOT-INF/classpath.idx) and use that information when building a classpath for use when starting the app via Start-Class. The buildpack should implement the same ordering rules as JarLauncher: classes, jar files on the file system that are not mentioned in classpath.idx, and jar files from classpath.idx.

Alternatively, the buildpack could start the app using JarLauncher named by Main-Class and avoid building a classpath altogether. This approach has the benefit of reducing complexity in the buildpack and avoiding the duplication of classpath ordering rules between the buildpack and JarLauncher.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions