从GWT 2.3迁移到2.6后的入口点 [英] Entry points after migrating from GWT 2.3 to 2.6
问题描述
我有2个具有以下结构的项目
I have 2 projects with the following structure
项目1
-
com/MyCompany/MyApp/UI/MyAppUI.gwt.xml
com/MyCompany/MyApp/UI/MyAppUI.gwt.xml
com/MyCompany/MyApp/UI/client/MyApp.java(入口点类)
com/MyCompany/MyApp/UI/client/MyApp.java (Entry Point class)
项目2
- com/MyCompany/MyApp/UI/MyAppUI.gwt.xml
第一个项目包含所有服务器和客户端代码,并编译为jar,第二个项目仅包含基本的html页面,css和图像,并编译为war.
The first project contains all server and client side code and compiles to a jar, and the second one only contains a basic html page, css and images and compiles to a war.
在升级之前,第二个项目的gwt.xml文件只是声明了第一个项目的入口点类,并且由于它们都具有相同的模块名称,因此我假设gwt编译器将它们结合在一起并将其全部编译到war文件中.
Before upgrading, the second project's gwt.xml file simply declared the entry point class of the first one, and since they both had the same module name I assume the gwt compiler joined them together and compiled it all to the war file.
如果我保留项目结构,则会收到一个编译错误,指出它在给定目录中找不到入口点(我假设它在第二个项目中正在寻找它),并且如果更改它,war文件不会不包含任何应在其中的javascript编译代码.
If I keep the project structure I get a compilation error stating it couldn't find the Entry point in the given directory(I assume it is looking for it in the second project), and if I change it the war file doesn't contain any of the javascript compiled code that should be in it.
我需要做的是使第二个项目声明第一个项目的入口点为自己的入口点.有办法吗?
What I need to do is make the second project declare the first project's entry point as its own. Is there a way to do that?
预先感谢
PD:我无权将其全部合并到一个项目中或进行任何重大更改,我必须根据自己的情况来做.
PD: I am not authorized to merge it all into a single project or perform any major changes of the sort, I have to make do with what I have.
推荐答案
解决方案是修改Project 2的pom文件,使其包含Project 1中的所有必需类.
Solution was to modify the pom file of Project 2 to include all necessary classes from Project 1
<directory>${basedir}/../MyCompany/src/main/java</directory>
<includes>
<include>**/ui/*.java</include>
<include>**/*.css</include>
<include>**/ui/*.gwt.xml</include>
<include>**/ui/**/*.java</include>
</includes>
这篇关于从GWT 2.3迁移到2.6后的入口点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!