-
Notifications
You must be signed in to change notification settings - Fork 6
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
Empty jars created when Intellij refreshes project #78
Comments
I see this empty jar was added in #15. And this does cause issues with quarkus when it runs
|
Thank you for reporting this. I also noticed another issue with this "hack" recently (I think). If the "hacky" code is triggered, because a transform runs early, it may create the Jar. But then there can be another instance of the transform running afterwards (e.g. in another subproject) that then finds the empty Jar and thinks it is legit. Then it proceeds with the other checks and, depending on how the plugin is configured, may fail with a "the Jar is not a module error". I think I would prefer to remove this hack again (revert #15). I think IntelliJ should not tigger this problem anymore for "standard" project setups. I'll have a look at the reproducer to see why it happens in this case. This may be an issue with the Quarkus/Gradle integration. Something similar to this problem with the shadow plugin: GradleUp/shadow#882. We could also improve/extend the "hack" somehow. But this feels wrong and it may be a deep rabbit hole.... |
The issue that the transform (sometimes?) runs during the IDEA Sync (before Jar files are created) still exists. I am not sure if it is the case for all projects, but it is in this reproducer and it looks like a very general code path to me. So that's a problem with how transforms are triggered in the Gradle/IDEA integrations itself. The change for #15 had two parts:
I looked again at the original reproducer from #15 and reproduced the problem from back then. Then I updated the After that, problem (2) was gone. What I will do is keep the check if the files exists (1) but remove creation of the empty Jar (2). With this change, the reproducer here does not have the Quarkus issue anymore. |
Thanks @jjohannes! Any idea on when a new release with this will be available? |
This is now released in |
Today I discovered this issue in Gradle: gradle/gradle#27372 Which you may hit if you combine this plugins with other plugins that uses the In some cases, it is fine to disable this plugins functionality for certain "special" configurations: |
empty-jars.zip
When refreshing the attached gradle project, the plugin causes empty jars to be created.
Commenting out
extra-java-module-info
and re-refreshing intellij after a gradle clean results in no empty jars.This is causing issues when using quarkus (I'll be creating an issue there as well) when it attempts to build and encounters a 0 byte jar.
The text was updated successfully, but these errors were encountered: