Skip to content

DOC: improve example/docs getting version from jar manifest #1663

@remkop

Description

@remkop

As suggested by @rileynull in #236 (comment), the example showing how to get version information from the manifest may be overly convoluted.

TODO: Experiment with this and update the docs if this works as expected.

(Potential example for the manual:

class ManifestBasedVersionProviderWithVariables implements IVersionProvider {
    public String[] getVersion() {
        String version = getClass().getPackage().getImplementationVersion();
        return new String[] { "${COMMAND-FULL-NAME} version " + version };
    }
}

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions