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

Manifest only populated for shadowJar #15

Open
jpenilla opened this issue Dec 30, 2024 · 4 comments
Open

Manifest only populated for shadowJar #15

jpenilla opened this issue Dec 30, 2024 · 4 comments

Comments

@jpenilla
Copy link
Contributor

The non-shaded jar does not contain any information in the manifest, as it's only added to shadowJar:

manifest.from(MANIFEST)

This is inconvenient when consuming the non-shaded variant of ART.

@shartte
Copy link
Contributor

shartte commented Dec 30, 2024

May I ask what you are doing with the MANIFEST in the unshaded version?

@jpenilla
Copy link
Contributor Author

I need the Main-Class attribute present to run it without hard coding the main class name. The ART version used is included in mache metadata, we'd prefer not to use the fat jar to allow upgrading the ASM version independently in the future.

@shartte
Copy link
Contributor

shartte commented Dec 30, 2024

How exactly are you planning to use it in that form?

  1. If you run a standalone jar with -jar, any additional classpath is ignored
  2. If you use Gradle to run it, the classpath configuration of the JavaExec task can only contain a single item

@jpenilla
Copy link
Contributor Author

You can have a JavaExec with multiple classpath elements, you just need to specify the main class as with java -cp. We determine the default main class by reading the manifests of the classpath jars. If there is more than one Main-Class specified it's an error and needs manual specification.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants