Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include Package Version Information in manifest #2177

Open
melloware opened this issue Aug 9, 2024 · 5 comments · May be fixed by #2355
Open

Include Package Version Information in manifest #2177

melloware opened this issue Aug 9, 2024 · 5 comments · May be fixed by #2355
Labels
enhancement User experience

Comments

@melloware
Copy link

Your Manifest is how JARS are identified.

For example:
WorkflowClient.class.getPackage().getImplementationVersion() returns NULL because your manifest is empty.

A proper manifest you can genereate with GRadle easily to look something like this... from Caffeine.

Manifest-Version: 1.0
Automatic-Module-Name: com.github.benmanes.caffeine
Build-Jdk-Spec: 11
Bundle-Description: A high performance caching library
Bundle-License: https://www.apache.org/licenses/LICENSE-2.0
Bundle-ManifestVersion: 2
Bundle-Name: com.github.ben-manes.caffeine
Bundle-SymbolicName: com.github.ben-manes.caffeine
Bundle-Version: 3.1.8
Export-Package: com.github.benmanes.caffeine.cache;uses:="com.github.b
 enmanes.caffeine.cache.stats";version="3.1.8",com.github.benmanes.caf
 feine.cache.stats;uses:="com.github.benmanes.caffeine.cache";version=
 "3.1.8",com.github.benmanes.caffeine;version="3.1.8"
Implementation-Title: A high performance caching library
Implementation-Version: 3.1.8
Require-Capability: osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=11))"

@Quinn-With-Two-Ns
Copy link
Contributor

The Java SDK does contain a manifest, however the manifest may not contain package version information. There is no strong reason we cannot add that though.

@Quinn-With-Two-Ns Quinn-With-Two-Ns changed the title MANIFEST.MF is empty Include Package Version Information in manifest Aug 9, 2024
@melloware
Copy link
Author

Yes I apologize I meant your Manifest is empty.

Manifest-Version: 1.0

@melloware
Copy link
Author

thanks in advance @Quinn-With-Two-Ns we are trying to create a Quarkus Extension for Temporal: https://github.com/quarkiverse/quarkus-temporal

@melloware
Copy link
Author

melloware commented Aug 16, 2024

this can be done with some pseudo code below but I have no idea where to plug this into your Gradle build ecosystem.

plugins {
    id 'java'
}

jar {
    manifest {
        attributes(
            'Implementation-Title': 'My Application',
            'Implementation-Version': version,
        )
    }
}

@melloware
Copy link
Author

Bump. For our Quarkus Extension we would like to display the version of Temporal in use on the DevOps card but right now we display ? because we can't detect the version.

image

@Quinn-With-Two-Ns Quinn-With-Two-Ns linked a pull request Dec 23, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement User experience
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants