简体   繁体   English

Maven和GWT项目

[英]Maven and gwt project

I m new user. 我是新用户。 I need a maven project using gwt dependecy. 我需要一个使用gwtDependecy的Maven项目。 Which archetype i can use?Project as New GWT web application and after build maven nature is better then maven project with gwt archetypes? 我可以使用哪种原型?将项目作为新的GWT Web应用程序,在构建Maven本质之后比使用gwt原型的Maven项目更好吗?

See: 看到:

I'd recommend not using the archetype from the gwt-maven-plugin. 我建议不要使用gwt-maven-plugin中的原型。 It's OK for people who already master GWT and Maven but definitely needs some polishing. 对于已经掌握GWT和Maven但肯定需要改进的人来说可以。 The gwt-maven-plugin has a lot of good ideas, badly executed; gwt-maven-plugin有很多好主意,执行不好; my recommendation is to only use it for its compile and generateAsync goals, and possibly mergewebxml , and run DevMode from your IDE (Eclipse with the Google Plugin for Eclipse, or IntelliJ IDEA Ultimate Edition). 我的建议是仅将其用于其compilegenerateAsync目标,并可能将其用于mergewebxml ,并从您的IDE(带有Eclipse的Google Plugin或IntelliJ IDEA Ultimate Edition的Eclipse)运行DevMode。 gwt:run works OK though if you prefer plain Maven, but it really works best for single-module Maven projects, which I don't recommend with GWT. 尽管您更喜欢普通的Maven,但是gwt:run可以正常工作,但是它对于单模块Maven项目确实是最合适的,我不建议在GWT中使用。

Disclaimer: I'm one of the maintainers of the gwt-maven-plugin. 免责声明:我是gwt-maven-plugin的维护者之一。

I have an old recipe for working with GWT and Maven , that should just need some minor editing of versions of plugins to get it working with the latest versions. 我有一个使用GWT和Maven旧方法,只需要对插件版本进行一些较小的编辑即可使其与最新版本一起使用。

I always start with Maven, generate my project structure, then import that into my IDE, starting at the IDE and going backwards is just asking for a world of pain. 我总是从Maven开始,生成我的项目结构,然后将其导入到我的IDE中,从IDE开始,然后向后退却是一个痛苦的世界。 So hand building your structure, or better yet using an Archetype is the preferred way to go. 因此,最好手动构建结构,或者最好还是使用原型。

We simply start with GWT sample/example project pom and work our way upwards/downwards from there. 我们仅从GWT样本/示例项目pom开始,然后从那里向上/向下工作。 If we need more features from dependencies we add or if we need lesser features we drop the dependencies provided in the sample files. 如果需要从依赖项中获取更多功能,则可以添加,或者如果需要的功能较少,则可以删除示例文件中提供的依赖项。

You can find the latest sample pom files in GWT Trunk here . 您可以在此处找到最新的示例pom文件。

  • dynatablerf dynatablerf
  • validation 验证
  • mobilewebapp mobilewebapp

Note - We do update plugin version in the pom files to access some more bleeding edge stuff. 注意-我们会更新pom文件中的插件版本,以访问更多最新功能。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM