Camork / file-expander-plugin

A IntelliJ plugin that can explore archive-based file in project view
GNU General Public License v3.0
44 stars 7 forks source link

The viewed jar is occupied and cannot be deleted #28

Closed meiMingle closed 12 months ago

meiMingle commented 1 year ago

Describe the bug When the jar package under the build folder is viewed through the File expander, the gradle clean command will fail because the jar package is in the occupied state.

Environment & Stack Trace

Camork commented 1 year ago

Sorry for the later, I can't reproduce this in v2023.2. Do you still get this problem?

sticksabuser commented 1 year ago

I am having the same issue. I have a gradle task that copies a jar file (which happens to be the jython-installer jar) belonging to a custom gradle dependency configuration into a subfolder in the gradle build folder. That task is setup to delete that subfolder (and hence the jar) before re-creating it every time it is run. Without the plugin loaded, this works fine. However; when the plugin is loaded, not only does it fail to delete the subfolder, but also occasionally causes intellij to freeze.

The versions of things involved:

Camork commented 1 year ago

@sticksabuser can you give me a simple demo? I have tested if I open a jar inside Intellij, and delete it from Windows Explorer, but it's ok, anything else I have left?

sticksabuser commented 1 year ago

I'll try setting up something Monday.

sticksabuser commented 1 year ago

I have created a public repo: https://github.com/sticksabuser/FileExpanderExample

Here are the steps to replicate (Apologies for being a little granular; I'm just trying to be explicit to make sure the issue can be repeated):

  1. Clone.
  2. Open as intellij project (I'm assuming you have the File Expander plugin installed and enabled).
  3. Add gradle project.
  4. Insure that gradle is using JDK 11 (in the gradle project tab, to right there's a gear, and at the bottom of the settings window that come up you can select the JDK). Also insure that the gradle wrapper is being used.
  5. Run the task "copyJython" under the "build" set of tasks from the intellij gradle tab.
  6. In the intellij project file browser tab, expand the "build/distribution" directory.
  7. Insure that thar jar file is also expanded.
  8. Try to run the "clean" task in the same manner that the "copyJython" task was run.

I hope this helps.

meiMingle commented 1 year ago

I have created a public repo: https://github.com/sticksabuser/FileExpanderExample

Here are the steps to replicate (Apologies for being a little granular; I'm just trying to be explicit to make sure the issue can be repeated):

  1. Clone.
  2. Open as intellij project (I'm assuming you have the File Expander plugin installed and enabled).
  3. Add gradle project.
  4. Insure that gradle is using JDK 11 (in the gradle project tab, to right there's a gear, and at the bottom of the settings window that come up you can select the JDK). Also insure that the gradle wrapper is being used.
  5. Run the task "copyJython" under the "build" set of tasks from the intellij gradle tab.
  6. In the intellij project file browser tab, expand the "build/distribution" directory.
  7. Insure that thar jar file is also expanded.
  8. Try to run the "clean" task in the same manner that the "copyJython" task was run.

I hope this helps.

This is the same situation I encountered

Camork commented 1 year ago

I caught that, maybe there is a nest jar inside the jar, It will be fixed in the next release.

Camork commented 12 months ago

Resolved in v2.3, you may receive the marketplace update in about two days. Thanks for your feedback.