使用新的gwt maven插件进行打包之战(已从默认的maven插件迁移而来) [英] Packaging war with new gwt maven plugin (having migrated from default maven plugin)

查看:126
本文介绍了使用新的gwt maven插件进行打包之战(已从默认的maven插件迁移而来)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我说过使用Thomas Broyer的gwt maven插件,因为它允许我运行gwt 2.8-rc2.我已经在代码服务器正常运行且工作量最小的情况下运行了它.

I've stated using Thomas Broyer's gwt maven plugin as it allows me to run gwt 2.8-rc2. I've got it running with the codeserver fine and with minimum effort.

但是现在我试图弄清楚如何使用它来进行完整的编译和打包.

However now I'm trying to figure out how to use it to do a full compile and package.

仅运行maven install(我希望它可以工作,因为它与默认设置一样工作)实际上并没有运行gwt编译.

Simply running maven install (I expected this to work as it does work with the default) does not actually run the gwt compile.

然后它讨论了各种包装格式等,我不确定为什么必须这样做吗?

Then it talks about various packaging formats etc and I'm not sure why these are necessary?

我认为有人得到了这个包装战争的插件,并且已经从原始插件中迁移过来了...

I assume someone has got this plugin packaging the war and has also migrated from the original plugin...

这是我的插件配置-我正在使用skipModule,因为我已经按照其他插件期望的方式配置了模块.

This is my plugin config - I am using skipModule as I've already got a module configured the way the other plugin expects.

                <plugin>
                    <groupId>net.ltgt.gwt.maven</groupId>
                    <artifactId>gwt-maven-plugin</artifactId>
                    <version>1.0-rc-6</version>
                    <extensions>true</extensions>
                    <configuration>
                        <moduleName>com.afrozaar.ashes.web.AshesWeb-safari</moduleName>
                        <skipModule>true</skipModule>
                        <style>DETAILED</style>
                        <!-- <logLevel>DEBUG</logLevel> -->
                        <classpathScope>compile+runtime</classpathScope>
                    </configuration>
                    <dependencies>
                        <dependency>
                            <groupId>com.google.gwt</groupId>
                            <artifactId>gwt-user</artifactId>
                            <version>2.8.0-rc2</version>
                        </dependency>
                        <dependency>
                            <groupId>com.google.gwt</groupId>
                            <artifactId>gwt-dev</artifactId>
                            <version>2.8.0-rc2</version>
                        </dependency>
                        <dependency>
                            <groupId>com.google.gwt</groupId>
                            <artifactId>gwt-servlet</artifactId>
                            <version>2.8.0-rc2</version>
                        </dependency>
                    </dependencies>
                </plugin>

推荐答案

您缺少插件配置中的执行"来运行编译目标(与CodeHaus插件相同).

You're missing "executions" in your plugin configuration to run the compile goal (works the same as with the CodeHaus plugin).

当您将客户端和服务器代码分成不同的Maven模块时,我的插件效果更好,这就是为什么未明确记录此设置的原因(因为我积极劝阻它).您可以查看GWT git存储库中的示例,以查找与您的案例类似的示例.

My plugin works better when you separate client and server code into distinct Maven modules, which is why this setup is not clearly documented (because I actively discourage it). You can have a look at the samples in the GWT git repository to find examples similar to your case though.

顺便说一句,我相信您可以将rc2与CodeHaus插件rc1一起使用;这可能就是您添加那些对我的插件无用的依赖项的原因.

BTW, I believe you can use rc2 with the CodeHaus plugin rc1; that's probably why you added those dependencies, which are useless with my plugin.

另请参见 https://tbroyer.github.io/gwt-maven- plugin/migrating.html

这篇关于使用新的gwt maven插件进行打包之战(已从默认的maven插件迁移而来)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆