I am trying to add another project as a dependency to my vaadin project . Here is the step i follow,
1- Create Vaadin-Maven Project from command line.
mvn archetype:generate
-DarchetypeGroupId=com.vaadin
-DarchetypeArtifactId=vaadin-archetype-application
-DarchetypeVersion=7.3.4
2- After created project, i executed “mvn install” and “mvn jetty:run” and worked perfectly.
3- In eclipse, file->import->existing maven project, i imported project to eclipse
4- I added object which is releted my dependency project.
…
MavenMain mainObj; //Dependency project’s class
Button button = new Button(“Click Me”);
button.addClickListener(new Button.ClickListener() {
public void buttonClick(ClickEvent event) {
layout.addComponent(new Label(mainObj.getMsg()));
) });
…
5- Normally, eclipse gave an error about finding class. So i added dependency.
6- Execute mvn eclipse:eclipse command from terminal. Then, i select “organize input” options from eclipse.
After applied this steps, eclipse still can’t find my dependency project’s class. I think problem is vaadin related. Because, i create basic maven project from eclipse and followed same steps and works perfectly.
Is there any problem with Maven2 -Vaadin7 about adding dependency ?
Thanks for reply, i just followed your steps results are below
…
2014-11-10 11:16:51.274:INFO:oejs.AbstractConnector:Started SelectChannelConnector@0.0.0.0:8080[INFO]
Started Jetty Server Nov 10, 2014 11:17:16 AM com.vaadin.server.DefaultErrorHandler doDefault
SEVERE:
java.lang.Error: Unresolved compilation problems:
MavenMain cannot be resolved to a type
MavenMains cannot be resolved to a type
…