Win XP、Maven 3.0.3およびGWTでEclipse Indigoを使用しています2.4。私はGWT-Mavenプロジェクトを作成し、ここにある指示に従ってEclipseにインポートしました。 - http://mojo.codehaus.org/gwt-maven-plugin/user-guide/archetype.htmlソースフォルダ(target/generated-sources/gwt、手順に記載されていないステップ)を追加した後、プロジェクトを右クリックして "Run As" - > "Web Application"を選択し、このエラーが発生しました。 。EclipseでGWT-Mavenプロジェクトを実行する際に問題が発生しました - クラスパスに「com/myco/clearing/product/ProductPlus.gwt.xml」が見つかりません
Loading modules
com.myco.clearing.product.ProductPlus
[ERROR] Unable to find 'com/myco/clearing/product/ProductPlus.gwt.xml' on your classpath; could be a typo, or maybe you forgot to include a classpath entry for source?
[ERROR] shell failed in doStartup method
この問題を解決するためにEclipseを設定する方法はありますか?私は言及した措置以外に何もしていない。
.gwt.xmlファイルはarchetypeによって作成され、src/main/resources/warディレクトリにあります。その内容は
<?xml version="1.0" encoding="UTF-8"?>
<module rename-to='ProductPlus'>
<!-- Inherit the core Web Toolkit stuff. -->
<inherits name='com.google.gwt.user.User' />
<!-- We need the JUnit module in the main module, -->
<!-- otherwise eclipse complains (Google plugin bug?) -->
<inherits name='com.google.gwt.junit.JUnit' />
<!-- 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.standard.Standard' />
<!-- <inherits name='com.google.gwt.user.theme.chrome.Chrome'/> -->
<!-- <inherits name='com.google.gwt.user.theme.dark.Dark'/> -->
<!-- Other module inherits -->
<!-- Specify the app entry point class. -->
<entry-point class='war.client.ProductPlus' />
<!-- Specify the paths for translatable code -->
<source path='client' />
<source path='shared' />
</module>
おかげで、ある - デイブ
"クリーンインストールgwt:run"で実行構成を作成するなど、私が提案したすべてを行いました。ただし、その構成を実行すると、同じエラーが発生します。 '[エラー] [ProductPlus] - クラスパスで' ProductPlus.gwt.xml 'が見つかりません。入力ファイルのクラスパスエントリを含むのを忘れてしまったのでしょうか? "このファイルは自動生成され、src/main/resources/warディレクトリにありますので、私は戸惑います。 – Dave
あなたのモジュールファイルは、Maven-GWTプロジェクトのsrc/main/resources/com/yourcompany /に置く必要があります。src/main/javaにあるソースを "ミラーリング"する必要があります。/com/yourcompany /。あなたはMaven-GWTプロジェクトにwarフォルダを持ってはいけません!コンパイルされたコードは 'target'フォルダに移動しますあなた自身を投稿したリンクのフォルダのレイアウトを見てください(Maven GWT Plugin) Entry-pointクラスを指定するとき、パスはsrc/main/java /に相対的でなければならないので、例えば と指定します。 –
Renato