lists GitHub users
Note: shared logic is provided by the github-users project.
As you can see from the demo, this project already delivers the full build toolchain for Web application. Still there are several things TODO.
Running the project during development requires starting the codeserver (GWT Super Dev Mode) in parallel with regular Jetty servlet container serving static resources and in the future also server part of the application.
/!\ Note: In order to start jetty from within the
module you will need to install dependant modules first:
$ mvn install
It's one time action which will also verify if the project builds correctly in your environment.
Open 2 terminals and invoke these commands:
$ mvn gwt:codeserver -pl *-client -am -Denv=dev
$ cd *-server $ mvn jetty:run -Denv=dev
Head your browser to:
index.html will work as well after invoking the whole toolchain
mvn package), but it will server the JS code which is already compiled
and minified by the Closure Compiler, making it a bit more cumbersome to debug,
but closer to expected production environment.
If you are planing to extend this project or to borrow the toolchain and use it somewhere else, than check conventions used in this project.
Maven archetype with predefined toolchain
Once this project proofs to fulfill all the requirements, it might be used as a base for generalized maven archetype automating creation of such an application.
GWT client code which will be transpiled to JS. When building the project, this module will provide an artifact in the form of WAR archive containing only compiled static web resources.
During development the
codeserver can be started out of this module as well.
As this application does not provide any server-side logic at the moment, it is also possible to extract web resources from the WAR archive and serve them statically.
This project contains special technical modules:
They should be a part of
github-users-web-server build definition, but are separated as a
workaround to inflexibility of the
maven-exec-plugin which does not allow separate classpaths
for each forked java process, unless it is separate maven module. These tools should be
also executed in specified order which is achieved thanks to explicit dependency chain.
appengine module will take care of deploying this project in the Google App Engine.
It is separated from the
github-users-web-server module to allow stripping down the
WAR file from all excessive JS sources. In the future only files listed in the
compiled.js.map should be retained.
$ mvn clean install $ mvn -pl github-users-web-appengine appengine:deploy