Vaadin 7, maven, tomcat, eclipse integration

Hi There,

I’m trying to set up a Vaadin 7 development environment using the followings:
Vaadin 7
Eclipse
Tomcat(eclipse integrated)
Maven

These doesn’t seams to be straight forward. The vaadin 7 project works fine on jetty but on tomcat only if I deploy the war(which is not the way for a dev environment)

Can anyone please help me with some guidance?

Corneliu

Hi,

do you mean with “deploy the war” to start/run the Vaadin-project
by project-context → Run As → Run on server?

Greetings Maik

Yes,

RunAs-> Run on Server(embeded server is Tomcat) does not work if the project is created using maven vaadin archetype in eclipse.

Before RunAs-> Run on Server I run mvn vaadin:compile, and then in browser I get “Failed to load widgetset: ./VAADIN/widgetset…”

I am using Eclipse Luna, Java 7, Tomcat 7, Embeded maven 3.2.1

If I’m packing the application in war using maven and then deploy it to a standalone server the app is working fine.

Thanks
Corneliu

Thanks for the additional details,
but here i’m out. Sorry.
Good luck.
Greetings Maik

Hi,

The problem your maven vaadin archetype app is not running using the Eclipse embedded Tomcat is caused by the vaadin-maven-plugin configuration in the pom.xml

<plugin> <groupId>com.vaadin</groupId> <artifactId>vaadin-maven-plugin</artifactId> <version>${vaadin.plugin.version}</version> <configuration> <extraJvmArgs>-Xmx512M -Xss1024k</extraJvmArgs> <webappDirectory>${basedir}/target/classes/VAADIN/widgetsets</webappDirectory> <draftCompile>false</draftCompile> <compileReport>false</compileReport> <style>OBF</style> <strict>true</strict> </configuration> ... The webappDirectory ${basedir}/target/classes/VAADIN/widgetsets containing your compiled widgetset will not be copied to the wtpwepapps folder of your embedded Tomcat. Even adding this folder to the Eclipse project properties - Deployment Assembly won’t work.

If you don’t need a personalized widgetset, you might want to remove the @Widgetset annotation in your UI and add the vaadin-client-compiled dependency to the pom.xml

<dependency> <groupId>com.vaadin</groupId> <artifactId>vaadin-client-compiled</artifactId> </dependency> In case you need your own widgetset, you should be able to find a workaround based on above information.

Cheers,
Koenraad

Hi,

@Koenraad- thanks for reply but my problem fixed by adding to Deployment Assembley the following entry:
/target/classes/VAADIN/ WEB-INF/classes/VAADIN

Regards
Corneliu

Hi,
Thanks for the feedback.
So Deployment Assembly worked better than I expected.
That’s good news.

Koenraad

Hi I am new to vaadin and i am having a problem with this as well.
May i clarify on your ‘adding to Deployment Assembly’ ? How do you do that

Thank you