GWT - Невозможно найти многомодульную архитектуру типа com.myapp.launcher.client.LauncherInitializer.
У меня есть проект со следующей структурой:
com.myapp.gwt:
Basic.gwt.xml
Launcher.gwt.xml - inherits Basic.gwt.xml
Module1.gwt.xml - inherits Basic.gwt.xml
com.myapp.gwt.ui.basic.client:
AppActivityMapper.java
AppHistoryManager.java
AppPlaceHistoryMapper.java
BasicInitializer.java - this is a daddy class for all entry points
MainClientFactory.java
MainClientFactoryImpl.java
com.myapp.gwt.ui.launcher.client: - all the stuff for the launcher module is here
LauncherInitializer.java (extends BasicInitializer, launcher module's EntryPoint)
com.myapp.gwt.ui.launcher.client.places:
Places and activities for the launcher module
com.myapp.gwt.ui.module1.client: - all the stuff for the module1 module is here
Module1Initializer.java (extends BasicInitializer, module1 module's EntryPoint)
com.myapp.gwt.ui.module1.client.places:
Places and activities for the module1 module
com.myapp.gwt.shared:
Stuff shared between the client and the server (interfaces, dtos)
com.myapp.gwt.server:
Code that works only on the server
то, что у меня есть в моем Basic.gwt.xml, это:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.1.0//EN" "http://google-web-toolkit.googlecode.com/svn/tags/2.3.0/distro-source/core/src/gwt-module.dtd">
<module rename-to='myapp'>
<!-- Inherit the core Web Toolkit stuff. -->
<inherits name='com.google.gwt.user.User' />
<!-- Inherit the default GWT style sheet. You can change -->
<!-- the theme of your GWT application by uncommenting -->
<!-- any one of the following lines. -->
<inherits name='com.google.gwt.user.theme.clean.Clean' />
<inherits name="com.google.gwt.place.Place" />
<inherits name="com.google.gwt.activity.Activity" />
<inherits name="com.google.gwt.editor.Editor" />
<!-- Specify the paths for translatable code -->
<source path='ui.basic.client' />
<source path='shared' />
<replace-with class="com.myapp.gwt.ui.basic.client.ClientFactoryImpl">
<when-type-is class="com.myapp.gwt.ui.basic.client.ClientFactory" />
</replace-with>
<set-configuration-property name="UiBinder.useSafeHtmlTemplates" value="true" />
</module>
что у меня есть в моем Launcher.gwt.xml это:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.1.0//EN" "http://google-web-toolkit.googlecode.com/svn/tags/2.3.0/distro-source/core/src/gwt-module.dtd">
<module rename-to='launcher'>
<!-- Other module inherits -->
<inherits name="com.myapp.gwt.Basic" />
<!-- Specify the paths for translatable code -->
<source path="ui.launcher.client"></source>
<!-- Specify the app entry point class. -->
<entry-point class='com.myapp.gwt.ui.launcher.client.LauncherInitializer' />
</module>
Ни один из моих классов, проживающих внутри com.myapp.gwt.ui.basic.client
Пакет имеет ссылку на любой из классов внутри других пакетов модуля. С другой стороны, другие пакеты модулей имеют множество ссылок на базовый модуль, а некоторые классы даже расширяют классы внутри базового пакета.
Проблема в том, что я получаю эту ошибку во время компиляции в модуль запуска JavaScript:
[TRACE] [launcher] - Поиск классов точки входа [ОШИБКА] [launcher] - Невозможно найти тип 'com.myapp.gwt.ui.launcher.client.LauncherInitializer' [ERROR] [launcher] - Подсказка: предыдущие ошибки компилятора могли сделать этот тип недоступным [ОШИБКА] [лаунчер] - Подсказка: проверьте цепочку наследования от вашего модуля; он может не наследовать требуемый модуль или модуль может не добавлять свои записи исходного пути должным образом [ОШИБКА] [launcher] - Не удалось загрузить модуль 'launcher' из пользовательского агента 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:5.0) Gecko/20100101 Firefox/5.0' на локальном хосте:61253
Также, пожалуйста, скажите мне, если вы видите, что стоит что-то изменить в материалах, которые я сделал
1 ответ
Решение
Просто быстрое предположение: ты пробовал: <source path='ui/basic/client' />