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
Map application plugin main class to JAR manifest #13125
Comments
Do you have more doc for this? Would it be possible to create a jar with a manifest main entry which is not really executable with java -jar? |
(BTW, bonjour!) |
@ludoch 👋 That is an interesting data point. And since the JPMS support takes care of adding the main class to the Interested to have the opinion of other Gradle users if they have similar requirements / remarks / concerns. |
I wrote my own application plugin that adds the |
I've always expected the application plugin to set the Main-Class and Class-Path entries so |
Never saw this behavior with Maven (yet)... You experience was with Gradle or Maven? |
? Nobody mentioned Maven. I haven’t used it for years. I was referring to the Gradle application plugin. |
Is there any update on this ticket? Is this feature still planned to be released in Gradle 7? Has there been any investigation into if we can avoid creating multiple jars with Main-Class manifest entries? (#13057) |
No further update, still interested in having more user feedback on this topic.
I do not see that being a responsibility of Gradle. If a build author wants to create multiple executable JARs, why should Gradle prevent it? Regarding using that information to determine the main output of a project, I think it is at best a brittle solution. |
Now that Gradle is looking at the 7.0 content, going back on this issue, it seems like its benefit are too small given the potential drawbacks.
|
@ljacomet I've written a Gradle plugin to build Java applications that work this way. Take a look, I'd actually like to contribute it to Gradle if there is interest 🙂 |
While this change was done as part of the work for JPMS support in Gradle 6.4, it was considered a breaking change and thus postponed to Gradle 7.0.
See #13057 for context.
The text was updated successfully, but these errors were encountered: