Search code examples
mavengwtm2eclipsem2e

"Messages cannot be resolved to a type" error for an archetype created GWT maven project


I just created a project following this instructions:

http://mojo.codehaus.org/gwt-maven-plugin/user-guide/archetype.html

It clearly says to run the following command:

mvn archetype:generate \
   -DarchetypeGroupId=org.codehaus.mojo \
   -DarchetypeArtifactId=gwt-maven-plugin \
   -DarchetypeVersion=2.5.1

When imported by Eclipse (Kepler), the project wasn't seen as a maven project. This was fixed by converting to a maven project. So far, "so good".

Then the following error appears in Eclipse:

Messages cannot be resolved to a type

Why is that? Shouldn't it be working flawlessly?

=== EDIT ===

I removed the "What should I do to fix this?" question because, actually, I don't "care" how to fix it. What I mean is: I can fix it by adding some libraries or modifying the generated code. The actual question is Isn't the created projects from archetypes supposed to work flawlessly?

The problems seems to be related to i18n, which, right now, I don't care. Even if the archetype wants to enable it in the initial project, shouldn't it resolve the dependencies and the project setup so I can import it on eclipse without any problems?

The page below doesn't give any warning about that:

http://mojo.codehaus.org/gwt-maven-plugin/user-guide/archetype.html

I know, I know, I should be used to this, it happens all the time. :-) For all your effort, thanks.


Solution

  • This is an error from http://mojo.codehaus.org/gwt-maven-plugin/user-guide/archetype.html. Simple as that.

    Unfortunately, archetypes created by following their instruction gotta be modified in order to use. Hence, I'm closing this question.