Hi Lucas, You can follow the steps below to package an existing module, say module A defined in project A, that you want to reuse in another project, say project B that defines module B which itself defines an entrypoint class.
1) Create / move all the GWT code that you want to reuse in project A. 2) Create / update the module XML file for module A in the normal way, except you no longer need to define an entry point class. 3) Create a JAR for project A (project-a.jar), which should include 1) GWT source code that you want to reuse from the project, 2) The module XML file, 3) Any other public resources referenced by the module XML file, 4) The binary .class files for any server-side code that you want to reuse 4) Add the project-a.jar file to the project B classpath, as well as any other launch configurations related to project B (typically hosted mode and compile configurations). 5) Reference the module A xml file from the module B xml file (e.g. <inherits name="com.google.projectA.ModuleA" />). Note that since the module A xml file should already include the <inherits name="com.google.gwt.user.User" /> inherits tag, you shouldn't need to add that reference again to the module B xml file. You should be ready to go. Give those instructions a try and let us know if you managed to package and reuse your module. Hope that helps, -Sumit Chandel On Fri, Jul 31, 2009 at 10:37 AM, Lucas Neves Martins <[email protected]>wrote: > > Nope, > > Can anybody give a step-by-step ? > > On 29 jul, 10:49, Nuno <[email protected]> wrote: > > you dont need to do much thing for this... > > just create your gwt library project, you dont need to define any > > entrypoints. > > > > after, just click with your right button on your project, then export, > then > > select java package > > > > after you only need to import > > this jar on the other project you want to use it, and on the module > > xml make reference to the xml of the library. > > > > you can find an example on my blog.http://tcninja.blogspot.com > > > > On Wed, Jul 29, 2009 at 10:10 AM, Lucas Neves Martins < > [email protected]>wrote: > > > > > > > > > > > > > I looked it up all over the internet, but I only found this link : > > > > >http://developerlife.com/tutorials/?p=229 > > > > > I need to create a .jar with gwt views (those .java in the client > > > package) and then import it to other gwt project, much like they do > > > with the SmartGwt api. > > > > > How they did the SmartGwt api? Where is the Docs/Tutorial/Whitepapers > > > on how to create and export GWT modules? > > > > > I follow the instructions on this link above, but it just doesn't > > > work, when I try to compile it, I get an error telling me that the > > > compiler couldn't find the class I am using, even the class is on the / > > > lib dir, and in my buildpath, and in the .xml with a declared inherit. > > > > > Does anybody know how do I do that? > > > > -- > > Quer aprender a programar? acompanhe: > > Wants to learn GWT? Follow this blog -> > > > > http://tcninja.blogspot.com > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~----------~----~----~----~------~----~------~--~---
