Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 357620 - [jar exporter] Wrong message when exporting Jar with compile errors
Summary: [jar exporter] Wrong message when exporting Jar with compile errors
Status: RESOLVED INVALID
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.6.2   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-14 08:06 EDT by Marvin Fröhlich CLA
Modified: 2011-10-27 10:59 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marvin Fröhlich CLA 2011-09-14 08:06:20 EDT
Build Identifier: 20100917-0705

When right-clicking a jardesc for my project and selecting "Create Jar" while the project has compile errors, the message box only says, that there are warnings and displays the warning icon. In the details the compile error is correctly listed.

Reproducible: Always

Steps to Reproduce:
I have setup the jardesc to export classes with compile errors and warnings.

This behavior shows up in the last two or three major releases of Eclipse. Prior to that it was ok.
Comment 1 Dani Megert CLA 2011-09-16 02:40:53 EDT
This works as designed because the export finished and even exported the Java file which contains errors. Hence, we only display a warning.
Comment 2 Marvin Fröhlich CLA 2011-09-16 09:16:01 EDT
I guess, you're talking about the "Export classes with compile errors and warnings" flag, which I have enabled. If I disable it, there's still just a warning, but the erroneous class file is not in the jar.

The situation is, that the jar doesn't contain a runnable copy of the application, which the user will certainly expect, if the IDE displayed no error, but just a warning. Hence there should be an error message with an error icon.
Comment 3 Dani Megert CLA 2011-10-27 10:59:19 EDT
(In reply to comment #2)
> I guess, you're talking about the "Export classes with compile errors and
> warnings" flag, which I have enabled. If I disable it, there's still just a
> warning, but the erroneous class file is not in the jar.
That's not what I see. Actually that case is even worse: it doesn't even show any dialog. This is captured in bug 221782.

In case when the options are enabled, the warning dialog is the correct thing to show.