如何在没有EntryPoint的情况下编译模块? [英] How do I compile a module without an EntryPoint?

查看:129
本文介绍了如何在没有EntryPoint的情况下编译模块?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个GWT的实用程序模块,它没有UI(因此,没有类继承自 com.google.gwt.core.client.EntryPoint 。当我尝试使用GWT 1.7.1编译此模块时,出现此错误:

I have a utility module for GWT which doesn't have an UI (hence, there is no class which inherits from com.google.gwt.core.client.EntryPoint. When I try to compile this module with GWT 1.7.1, I get this error:

[ERROR] Module has no entry points defined

我如何摆脱这个错误?我真的必须定义一个虚拟条目点?Google是如何编译它们自己的实用程序模块的?

How do I get rid of this error? Do I really have to define a dummy entry point? How did Google ever compile their own utility modules???

推荐答案

我使用 gwt-maven-plugin Maven2插件来编译我的代码,我从老版本的 maven-googlewebtoolkit2-plugin 插件迁移了代码。旧插件,我必须指定哪些模块是入口点,如下所示:

I'm using the gwt-maven-plugin Maven2 plugin to compile my code. I migrated the code from an old version of the maven-googlewebtoolkit2-plugin plugin. For the old plugin, I had to specify which modules were entry points like so:

                <compileTargets>
                    <param>com.project.module.Module</param>
                </compileTargets>

对于新插件,它是

For the new plugin, it's

                <module>com.project.module.Module</module>

由于插件找不到要编译的模块,因此它会搜索* .gwt.xml 并将它们全部编译成UI模块(它必须有一个入口点)。

Since the plugin couldn't find which modules to compile, it search for "*.gwt.xml" and compiled all of them into "UI modules" (which must have an entry point).

这篇关于如何在没有EntryPoint的情况下编译模块?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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