Skip to content

Improve documentation of classpath.idx file and its generation by the Maven and Gradle plugins #37125

@davidmichaelkarr

Description

@davidmichaelkarr

The "classpath.idx" file allows for the possibility of controlling the artifact load order. In reality, it's completely impractical to do anything with this.

The entries in the file are in the form of "artifactname-version.jar". In a Maven application, it would be extremely awkward to have a local copy of this file in the project and cause that file to be used instead of the generated one, for multiple reasons.

The Spring-boot-maven-plugin really needs an interface for manipulating the content of this file, but not necessarily the entire file.

One reason someone might need to control the order of these artifacts is if two or more artifacts have the same FQCN, with different content. Obviously, that's a bad situation, and artifacts like that likely would be considered to be defective, but that's no consolation if you have no choice but to use them.

At a minimum, to deal with this particular situation, I would want to be able to specify a list of GA pairs, with the implication that the order of those pairs should reflect the ordering of those pairs in the classpath.idx file. There may be other artifacts in between, but for instance, if I had artifact "Foo" first in the list, and artifact "Bar" second in the list, in the resulting "classpath.idx" file, the entry for "Foo-version.jar" needs to be before the entry for "Bar-version.jar".

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions