Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 350250 - bogus error message "The declared package 'x.y.z' does not match the expected package"
Summary: bogus error message "The declared package 'x.y.z' does not match the expected...
Status: CLOSED WORKSFORME
Alias: None
Product: Xtend
Classification: Tools
Component: Core (show other bugs)
Version: 2.2.0   Edit
Hardware: PC Windows 7
: P3 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-24 09:08 EDT by Stephan Herrmann CLA
Modified: 2017-10-31 11:26 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stephan Herrmann CLA 2011-06-24 09:08:16 EDT
I had a stock XText project in my workspace and in a runtime workbench
I tried to experiment with an xtend generator, so I copied the example
generator into the runtime workspace.

The XYZGenerator.xtend then showed the error:
  The declared package 'x.y.z' does not match the expected package

First, it would be very nice if the message shows *what* package was
actually expected. In my case however, the class was in the correct
package in a valid source folder. So the message actually gave no clue
to what was wrong.

It turns out the *only* way to get rid of the error: rename the class.
It *seems* that the tool was trying to tell me that this is a duplicate
class (because the version from the first workspace is in scope, too).

After all, why can't a local xtend class have the same qualified name
as one visible via a plug-in dependency?
Comment 1 Benjamin Schwertfeger CLA 2012-07-19 03:20:18 EDT
Thanks for your description. Even if I call maven without clean the error appears. Perhaps because the class is inside the xtend-gen and inside the temporary folder.
Comment 2 Sven Efftinge CLA 2013-09-12 09:18:52 EDT
I cannot reproduce this one.
Please reopen if it still happens and provide the steps needed to reproduce.
Comment 3 Eclipse Webmaster CLA 2017-10-31 11:26:42 EDT
Requested via bug 522520.

-M.