我有一個maven多模塊項目。其中一個模塊(編譯爲.jar
)僅包含域對象,將在客戶端和服務器端使用(我將這個.jar
作爲依賴項添加到其他我的模塊中)。GWT。 Maven的。 GWT模塊<module_name>未在項目源或資源中找到
我知道GWT模塊將使用來自共享.jar
的對象,它還必須具有用於成功編譯的源文件。所以,我試圖添加到我的pom.xml
兩個:
<resources>
<resource>
<directory>src/main/java/<path></directory>
<includes>
<include>**/*.java</include>
<include>**/*.gwt.xml</include>
</includes>
</resource>
</resources>
和
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<versionRange>[${gwt.version}]</versionRange>
<goals>
<goal>resources</goal>
</goals>
<plugin>
但導致.jar
不包含GWT模塊源(即gwt.xml
)。所有域類的源也被添加(在根目錄.jar
),但不是ModuleName.gwt.xml
。
問題在哪裏?謝謝。
源樹中的哪個位置是gwt.xml文件? –
@MyTitle:當您使用GWT + Maven和構建庫時,請將您的投票作爲GWT庫(放置'.gwt.xml'等)的首選/標準佈局:https:// groups。 google.com/d/topic/google-web-toolkit/Y0dqogsT1Zw/discussion –