• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

tbroyer/gwt-maven-archetypes

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

tbroyer/gwt-maven-archetypes

开源软件地址(OpenSource Url):

https://github.com/tbroyer/gwt-maven-archetypes

开源编程语言(OpenSource Language):

Java 83.2%

开源软件介绍(OpenSource Introduction):

gwt-maven-archetypes

This project contains Maven archetypes for modular GWT projects.

How to use

Generate a project

mvn archetype:generate \
   -DarchetypeGroupId=net.ltgt.gwt.archetypes \
   -DarchetypeVersion=LATEST \
   -DarchetypeArtifactId=<artifactId>

where the available <artifactIds> are:

  • modular-webapp
  • modular-requestfactory
  • dagger-guice-rf-activities

This should use the latest release from the Central Repository. Alternatively, and/or if you want to hack on / contribute to the archetypes, you can clone and install the project locally:

git clone https://github.com/tbroyer/gwt-maven-archetypes.git
cd gwt-maven-archetypes && mvn clean install

You'll then use the mvn archetype:generate command from above, except for the -DarchetypeVersion argument which you'll replace with HEAD-SNAPSHOT.

Start the development mode

Change directory to your generated project and issue the following commands:

  1. In one terminal window: mvn gwt:codeserver -pl *-client -am
  2. In another terminal window: mvn jetty:run -pl *-server -am -Denv=dev

Or if you'd rather use Tomcat than Jetty, use mvn tomcat7:run instead of mvn jetty:run.

Note that the -pl and -am are not strictly necessary, they just tell Maven not to build the client module when you're dealing with the server one, and vice versa.

Profiles

There's a special profile defined in the POM file of server modules: env-dev, which is used only when developping. It configures the Jetty and Tomcat plugins and removes the dependency on the client module (declared in the env-prod profile, active by default.)

To activate the env-dev profile you can provide the -Denv=dev system property, or use -Penv-dev.

Compatibility

To use variable interpolation in parameters during mvn archetype:generate, you need at least version 2.2 of the maven-archetype-plugin. Archetypes use ${module.toLowerCase()} as the default value for the module-short-name parameter, so if you don't use version 2.2 or above of the maven-archetype-plugin, make sure you provide a value and do not use the default one for that parameter. You can also make sure you use version 2.2 of the plugin by using mvn org.apache.maven.plugins:maven-archetype-plugin:2.2:generate instead of mvn archetype:generate. It should be noted that variable interpolation also does not work in M2Eclipse's wizard, despite using recent versions of Maven thus (probably) a recent-enough version of the maven-archetype-plugin.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap