caarlos0
caarlos0

Reputation: 20633

What I have to change in a GWT project to make it a "module"

I was wanting to add some components and generic code that I made in a separate project, to reuse in my other projects.

But I don't know how to lay out the packages (in the case of adding CSS and JavaScript files), modules, my own settings over juice/gin and etc...

I wonder if anyone knows exactly what the changes necessary to create a module from a common GWT project.

Thanks in advance.

Upvotes: 1

Views: 88

Answers (1)

Graham
Graham

Reputation: 192

To reuse a GWT module:

  • Create a new JAR file that contains the module you wish to archive, including all source code for the module (including Module XML file and public resources).
  • Add the newly created JAR to the project classpath in which you would like to reuse the previous module code. Also add the new JAR to any configurations classpaths related to the inheriting project.
  • Add an tag referencing the new module XML in the inheriting project module XML file.

Most important things to note are including all source code in the reusable GWT module JAR and then inheriting the module as you would any GWT module - See FAQ_GWTModuleInheritance

Upvotes: 1

Related Questions