Community
Participate
Working Groups
Yesterday, I exported some .class - files from one project into a JAR. I asked that export's JAR description to be saved into some file. Today, I do a completely unrelated export of .java - files from two projects into one JAR, including files from the same project. I don't want to save this JAR description, so I leave the option "Save the description of this JAR in the workspace." as "off". Towards the end of the export, I'm asked wether I want to overwrite that JAR description file I had yesterday. There has not been any previous visual clue towards that description file name anywhere in the JAR export wizard. As I had wanted to do this anyway, I upgrade from F2 to F3. Under F3, I repeat the .java export same workspace. Again, I'm asked wether I want to overwrite yesterdays JAR description file. I start one more JAR export. This time, I click "Save the description of this JAR in the workspace." to "on" and immediately to "off" again. That finally helps: No mention of yesterday's JAR description file any more. Allthough I think I have told eclipse _not_ to overwrite that file, every single time eclipsed asked me, it's contents have indeed been changed. I can revert to yesterday's version through "local history".
I tried to reproduce it but was able. Did the following: - create project Test with a CU - exported it to c:\tmp\test.jar saving jardesc under Test\test.jardesc - create project Test2 with a CU - open export to Jar - unchecked Save the description ... - pressed Finish observe: the systems asks you if you want to override c:\tmp\test.jar since I didn't change the location of the jar when exporting Test2. The Save the description... option works as expected. Are you sure the system didn't ask you to override the jar file ?
As a quick answer: I'm positive it wasn't asking me about the .jar file itself. But it could possibly be that what it did ask me was the manifest file of the previous export, which I had asked to be saved. As this export was a source code export only, I wasn't asked about the generation of a manifest this time. I'm trying to reproduce, so I can tell you more.
Sorry, I can't reproduce this with F3. I'm afraid I have to leave you alone with what little information is in this bug report already. If you wish, settle this as "Resolve/Worksforme". If you do, I'll resurrect if I ever catch this again.
Created attachment 1417 [details] Caught after all! It was the manifest! Explanation follows.
Excuse me. For a moment, I thought I did reproduce the bug, or at least something very close to it. But this time, it was only my own mistake. I got exactly what I had asked for. I was confused. Back to the original problem. I distinctly remember that my problems immediately went away when I quickly clicked "Save the description of this JAR in the workspace." to "on" and immediately to "off" again. That left the GUI in exactly the same visible state as it had been before, but somehow changed something internally, and thus got rid of the problem. It's that clear rememberence that tells me that it can't be my confusion only, but some Eclipse bug substance must also hide here somewhere. I appreciate that this entire bug page must not be overly clear for you, and does not make it easy to see what it is that's going on. I apologize for that fact. All of this said, I must confess to still more confusion on my part: I tend to think of a "manifest file" as the thing that *describes* a JAR archive. So, at the time when the original bug happened, I was not aware of the difference between what everybody calls a manifest file and what Eclipse calls a "JAR description file". (You may want to make that clearer in the GUI, call it "JAR export recipe" instead, if you wish.) Come to think of it, could I have entered the same file name for the manifest file and for the JAR description file, on that primary export that started this entire mess? What would Eclipse think of that?
No, wait. Back to the screen shot. I finally did catch something. There is a mistake, but that mistake is one level below, in the window you see below. I tell eclipse "I don't really care about that manifest file. Just generate one for me and forget about it afterwards." That checkmark "Reuse and save" is gray, I cannot uncheck it. I also cannot change the name of the file. But when I do the export, Eclipse tells me it's about to overwrite that manifest file, a fact that I could not change via the GUI a moment ago, and to a location I could not change a moment ago. This is clearly a bug in the GUI. My intention is to have the manifest file be autogenerated and never see it again. This intention I cannot pass on through the GUI. The GUI forces me to save the newly generated manifest to the workspace, wether I wish to do so or not.
The bug is that the manifest is generated at all. Note that the manifest is even written if you only export source. You could have changed the name by checking [x] Save the manifest in the workspace The reuse option comes as addition to saving.
This is even a 2.0.1 candidate.
Fixed. Available in 2.1 builds > 20020722 Waiting for permission to release to 2.0.1
Daniel, can you please describes the disadvantages of not fixing this for 2.0.1.
The concrete problem is: 1. Choose to export class files with the JAR Exporter and also choose to save the generated manifest file. 2. Do a second export with only Java files and resources (no class files) => the manifest is generated and written even though it makes no sense (the wizard page is not available) Not fixing this for 2.0.1 means: 1) The existing manifest file gets overwritten with bogus data without user notification if the "overwrite exisiting files" is checked (=> work is lost) 2) The user can't control the behavior (e.g. filename) unless he chooses to export to class files (this enables the manifest page in the wizard) Fix would be easy and is already tested in 2.1: change: // Save the manifest if (fJarPackage.isManifestGenerated() && fJarPackage.isManifestSaved()) { to: // Save the manifest if (fJarPackage.areClassFilesExported() && ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ fJarPackage.isManifestGenerated() && fJarPackage.isManifestSaved()) {
2.0.1 candidate
Closing this PR - not critical enough to be fixed in 2.0.1
You did not fix this, you just think it's not a big deal. Should not this be marked "resolved later" rather than "resolved fixed"? (I take the liberty of reopening it.)
No, oops - now I see: It *is* fixed, but in 2.1 only, not already in 2.0.1. Sorry for the noise. I'll "fix" it again.
Bug got OK to be fixed in R2.0.1 Released to R2_0_1 branch.
verified on build 200208211513