I am currently manually copying SmartGWT libs into my war/lib folder for deployment. I am using eclipse and the google eclipse plugin.
I know there are better ways to do this:
-
Create an ant build that copies the jar files. Manually update the ant build when needed.
-
Use the eclipse WTP assembly feature. I’m curious to know if I can use this in the standard eclipse (non-J2EE) version.
How do you assemble your deployments?
Hi, get the Stockwatcher demo provided by Google here : http://code.google.com/intl/fr/webtoolkit/doc/latest/tutorial/gettingstarted.html
and then take a look to the build.xml file it should help you.
Thanks.
That’s pretty much the ant solution - ie, just have something like this in the build.xml.
<target name="libs" description="Copy libs to WEB-INF/lib">
<mkdir dir="war/WEB-INF/lib" />
<!-- Add any additional server libs that need to be copied -->
<copy todir="war/WEB-INF/lib" flatten="true">
<fileset dir="${smartgwthome}/lib/" includes="**/*.jar"/>
</copy>
</target>
I guess I should just wean myself off the google eclipse plugin and use ant…
Im not sure if its the right way but here I use Google plugin to run in DevMode. You get a warning if your libs are not in the war folder, but he uses the libs found in the your classpath.
For deploy, i use ant or maven to build my war and copy all the libs.
If you have a better solution, please share.
cheers.
If you create a Web Project in eclipse, then the Deployment Assembly option appears. I’m still not certain how it works; I can’t find good documentation on it. (eg: http://www.eclipse.org/forums/index.php?t=tree&goto=542776&)
There is also a similar feature in the Google Eclipse Plugin: filesCopiedToWebInfLib http://indoos.wordpress.com/2009/04/09/gaegroovy-localnremote-with-eclipse-plugin/
For the moment, I add files in the war to my classpath (and copy them into the war lib folder). I prefer this method to linking to a shared JAR folder.