Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Explanation of GWT dependencies

GWT 2.5.1 currently ships with the following JARs:

  • validation-api-1.0.0.GA-sources.jar
  • validation-api-1.0.0.GA.jar
  • gwt-dev.jar
  • gwt-user.jar
  • gwt-elemental.jar
  • gwt-codeserver.jar
  • requestfactory-apt.jar
  • requestfactory-client.jar
  • requestfactory-apt-src.jar
  • requestfactory-client+src.jar
  • requestfactory-client-src.jar
  • requestfactory-server.jar
  • requestfactory-server-src.jar
  • requestfactory-server+src.jar
  • gwt-servlet.jar
  • gwt-servlet-deps.jar
  • gwt-soyc-vis.jar
  • gwt-api-checker.jar

Can some experienced GWT engineer please explain to me:

  1. What each of these JARs is used for? Some of these are obvious (gwt-user.jar, etc.) but some are not. For instance, what's requestfactory-apt.jar? Obviously it has to do with RequestFactory, but what is apt and is it client, share or server code? etc.; and
  2. Which "tier" each JAR belongs on (client, shared, server)?; and
  3. Can I assume that all the source JARs (*-src.jar) are meant to be on the client/shared tier, and thus GWT needs their source to cross-compile into JavaScript?

GWT's ZIP file doesn't seem to contain any documentation that explains these, nor does the GWT API documentation.

like image 854
IAmYourFaja Avatar asked Dec 19 '22 20:12

IAmYourFaja


1 Answers

  • gwt-servlet-deps.jar are third-party dependencies needed by gwt-servlet.jar. These are not directly within gwt-serlvet.jar to make it easier to deploy it to Maven Central.
  • requestfactory-apt.jar is an annotation processor (APT == Annotation Processor Tool), it must be present in your classpath at compile-time (javac compile-time, not GWT compile-time) and will generate a bunch of Java classes needed by RequestFactory on server side. It also includes the ValidationTool if you prefer running the tool after you compiled your classes. You'll find more info in the wiki
  • All -src.jar contain only source code and are only useful for debugging (to step into the code).
  • The +src.jar contain both compiled classes and their sources. In other words, requestfactory-client+src.jar is the same as requestfactory-client.jar + requestfactory-client-src.jar
  • All requestfactory-* JARs contain the shared classes.
  • requestfactory-client is a pure-Java RequestFactory client (no GWT-specific code inside), and be used on a server, a desktop application or an mobile Java application (e.g. Android). That JAR is also "contained" within gwt-user.jar.
  • requestfactory-server contains the RequestFactoryServlet and related classes. This JAR is also "contained" within gwt-user.jar and gwt-servlet.jar. Note that requestfactory-server has dependencies on third-party libraries; all of them being packaged within gwt-serlvet-deps.jar (if you want/need the details, you'll have to go look at the dependencies in Maven Central, or look at the GWT build script)
  • AFAICT, gwt-soyc-vis is legacy and useless.
  • Finally, gwt-api-checker is a tool used to check API compatibility between versions of GWT. There's some documentation in the wiki but it might be a bit outdated. FYI, this tool is used when GWT itself is built to verify that no unwanted backwards-incompatible changes are introduced.
like image 196
Thomas Broyer Avatar answered Jan 04 '23 19:01

Thomas Broyer