[英]How to create a library and use it in GWT project?
我正在嘗試創建一個UI庫,以在名為Test的GWT項目中使用它。 這就是我所做的:
我做錯了什么 ?
謝謝。
您需要將jar添加到Eclipse的GWT項目中:
另請參閱:僅需要在服務器端向GWT項目添加外部庫
我終於通過使用Maven做到了。
我用gwt-maven-plugin創建了一個maven項目:
Group Id : com.example
Artifact Id : gwtui
Packaging : jar
在pom.xml中,我添加了
<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/client/**</include>
<include>**/*.gwt.xml</include>
</includes>
</resource>
</resources>
我用maven的目標:包。 然后在我的Test.gwt.xml中,添加了
<inherits name='com.example.gwtui.GWTUI'/>
而且我沒有忘記在我的構建路徑中添加jar。 現在就可以了!
感謝您的幫助。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.