3
votes

I need a maven project configuration for a gwt project. The configuration should run in Eclipse (3.7!?) and from console (mvn, jenkins...).

I tried webAppCreator delivered with gwt:

webAppCreator.cmd -noant -maven -XnoEclipse -out WebAppCreated com.example.MyApp

And gwt-maven-plugin Archetype. Both project look very similar in Eclipse but they have very different configurations (different directories, and use of different plugins). I think they will behave very different if project evolves (adding tests, resources...). Because the archetype configuration is much smaller i would think it's closer to maven conventions - but is this also better?

What are the effective differences of both configurations?

And what configuration would you suggest as starting point?

1

1 Answers

6
votes

I always create POMs from scratch, but if you'd ask me, I'd probably choose the POM generated by the artifact.

The POM generated by the WebAppCreator launches the DevMode in target/www, which is weird, and it includes a maven-clean-plugin configuratin that simply is not needed (you shouldn't ever launch the DevMode using src/main/webapp as your war directory, so there's no need to clean it up)

The POM generated by the artifact on the other hand uses the i18n and generateAsync goals which IMO are not needed (they can be useful as one shot tools, but not to be run on each build; particularly the i18n goal).

If you ask me, none of them is a good starting point, but the artifact is less bad than the WebAppCreator.

EDIT: I started working on new archetypes: https://github.com/tbroyer/gwt-maven-archetypes They're not totally ready yet, but they're IMO already better than the gwt-maven-plugin archetype or the WebAppCreator.