can't add in utility project?

Hi,

Simple question, but the answer has thus far eluded me:

How can I have a vaadin project reference another project so that the wtp integration works properly?

I have made references to another project so that the source will build, but thus far I’ve had to create jars and put them in the WEB-INF folder to have the wtp deploy work. I was going to create a Utility project (which is what some online docs were suggesting in order to accomplish this goal), but there is no J2EE menu item in the Project/Properties dialog for the Vaadin application to link the current project to the Utility project, and I do not know a way to have this added in. In fact, it seems like it should be there as Vaadin is a J2EE project! This is rather important as development is otherwise slowed quite a bit having to maintain jars between projects…

So I’m quite stymied and spent a bunch of hours trying to resolve this to no avail. Help!

Thank you,

Mark

One way to do this is to use jetty instead of Tomcat. When using Jetty under Maven, it is possible to use

					<webAppConfig>
						<contextPath>/mywebapp</contextPath>
						<extraClasspath>target/classes;../criteriacontainer/target/classes</extraClasspath>
					</webAppConfig>

(criteriacontainer is my utility project)

Under Eclipse WTP, the J2EE Preview server seems to support adding the class path to its configuration (double-click on the server in the “Servers” tab, and find the “Open launch configuration” link). I haven’t tried it (yet) because my application is not currently set-up to deal with a J2EE server data source – will get there soon.

Well, I’m not using Jetty or Maven…

I was hoping there was some convenient way to do this because if I have to start managing the classes folder, I will also have to manage all the jars that are required as well, which is a big waste of time, as that is part of what the project already does…

Does anyone know of a way to have one project depend on another and have it work dynamically with wtp?
ie. without creating jars of one project and stuffing the jars into the other project

Thanks!

Mark

If you are using a reasonably recent Eclipse, you should find under your project’s properties the menu “Deployment Assembly”. There, you should add a new project, and select your utility project.

This will make Eclipse automagically to bundle your utility project into a jar and deploy it into your project.

Excellent, just what I needed. Thanks for getting me out of a bind!

Regards,

Mark

This works, thanks. But I expected “Vaadin project” to behave the same way… I had to create a new “J2EE Utility” project and move my “editor” code from the existing Vaadin Project there…

btw, I can’t compile Vaadin Widgets in a “Utility” project, it says this is only allowed for “Vaadin project”.