9

appengine が Super Dev Mode を使用しようとするのはなぜですか?

GWT アプリを appengine にデプロイしてアクセスしようとするたびに、白い読み込み画面が表示され、約 20 ~ 30 秒後に次のメッセージが表示されます。

appspot.com:9876 の Super Dev Mode サーバーからプロジェクトを読み込めませんでした。 サーバーの準備ができていることを確認してください。 もう一度やり直しますか?

私はgwt-maven-pluginappengine-maven-pluginで maven を使用しています。maven-gae-pluginを使用してデプロイすると、同じ結果が得られます。

2.6.1 バージョンの gwt と gwt-maven-plugin の使用に戻すと、正常にデプロイされるため、自動開発モード ランチャーと関係があるように見えます。

私の pom.xml の一部

    <build>
        <outputDirectory>${webappDirectory}/WEB-INF/classes</outputDirectory>

        <resources>
            <resource>
                <directory>src/main/resources</directory>
            </resource>
            <resource>
                <directory>src/main/super</directory>
            </resource>
            <resource>
                <directory>${project.build.directory}/generated-sources/apt</directory>
            </resource>
            <resource>
                <directory>${project.build.directory}/generated-sources/gwt</directory>
            </resource>
        </resources>

        <plugins>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${maven-compiler-plugin.version}</version>
                <configuration>
                    <source>${target.jdk}</source>
                    <target>${target.jdk}</target>
                    <encoding>${project.build.sourceEncoding}</encoding>
                    <proc>none</proc>
                </configuration>
            </plugin>

            <!-- JUnit Testing - skip *.GwtTest cases -->
            <!-- 'mvn test' - runs the Jukito tests -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>${maven-surefire-plugin.version}</version>
                <configuration>
                    <includes>
                        <include>**/*Test.java</include>
                    </includes>
                    <excludes>
                        <exclude>**/*GwtTest.java</exclude>
                        <exclude>**/*JUnitTest.java</exclude>
                    </excludes>
                </configuration>
            </plugin>

            <!-- GWT -->
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>gwt-maven-plugin</artifactId>
                <version>${gwt-maven-plugin.version}</version>
                <configuration>
                    <strict>true</strict>
                    <testTimeOut>180</testTimeOut>
                    <!-- With multiple tests use GwtTestSuite.java for speed -->
                    <includes>**/*GwtTest.java</includes>
                    <mode>htmlunit</mode>

                    <extraJvmArgs>-Xss1024k -Xmx2048M -XX:MaxPermSize=512M</extraJvmArgs>
                    <logLevel>INFO</logLevel>
                    <style>PRETTY</style>

                    <copyWebapp>true</copyWebapp>
                    <hostedWebapp>${webappDirectory}</hostedWebapp>

                    <server>com.google.appengine.tools.development.gwt.AppEngineLauncher</server>
                    <appEngineVersion>${gae.version}</appEngineVersion>
                    <appEngineHome>${gae.home}</appEngineHome>
                    <extraJvmArgs>-Dappengine.sdk.root=${gae.home}</extraJvmArgs>
                    <extraJvmArgs>-Ddatastore.default_high_rep_job_policy_unapplied_job_pct=20</extraJvmArgs>
                    <port>8888</port>

                    <runTarget>Project.html</runTarget>
                    <modules>
                        <module>com.utilitiessavings.usavappv7.Project</module>
                    </modules>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>compile</goal>
                            <goal>test</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <!-- Google App Engine Deployment -->
            <plugin>
                <groupId>com.google.appengine</groupId>
                <artifactId>appengine-maven-plugin</artifactId>
                <version>${gae.version}</version>
                <configuration>
                    <enableJarSplitting>true</enableJarSplitting>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <dependencies>

        <!-- Google Web Toolkit dependencies -->
        <dependency>
            <groupId>com.google.gwt</groupId>
            <artifactId>gwt-user</artifactId>
            <version>${gwt.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.google.gwt</groupId>
            <artifactId>gwt-servlet</artifactId>
            <version>${gwt.version}</version>
            <scope>runtime</scope>
        </dependency>

        <!-- Google App Engine dependencies -->
        <dependency>
            <groupId>com.google.appengine</groupId>
            <artifactId>appengine-api-1.0-sdk</artifactId>
            <version>${gae.version}</version>
        </dependency>
        <!-- Testing -->
        <dependency>
            <groupId>com.google.appengine</groupId>
            <artifactId>appengine-api-labs</artifactId>
            <version>${gae.version}</version>
        </dependency>
        <dependency>
            <groupId>com.google.appengine</groupId>
            <artifactId>appengine-api-stubs</artifactId>
            <version>${gae.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.google.appengine</groupId>
            <artifactId>appengine-testing</artifactId>
            <version>${gae.version}</version>
            <scope>test</scope>
        </dependency>

        <!-- Persistence dependencies -->
        <dependency>
            <groupId>javax.persistence</groupId>
            <artifactId>persistence-api</artifactId>
            <version>${persistence-api.version}</version>
        </dependency>
        <dependency>
            <groupId>com.googlecode.objectify</groupId>
            <artifactId>objectify</artifactId>
            <version>${objectify.version}</version>
        </dependency>
        <dependency>
            <groupId>javax.validation</groupId>
            <artifactId>validation-api</artifactId>
            <version>${javax.validation.version}</version>
        </dependency>

        <!-- Other dependencies -->
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>servlet-api</artifactId>
            <version>${servlet-api.version}</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>jstl</groupId>
            <artifactId>jstl</artifactId>
            <version>1.2</version>
        </dependency>

    </dependencies>

私の Project.gwt.xml で

<add-linker name="xsiframe" />

(この行を削除しようとしましたが、それでも同じ結果が得られました)

環境

エクリプス・ルナ (4.4.1)

Maven 3.2.3 (3.2.1 埋め込み)

m2eclipse 1.5.0

4

2 に答える 2

4

gwt:compilenocache.js ファイルのタイムスタンプをソース ファイルのタイムスタンプと比較し、出力が最新であると判断した場合は GWT のコンパイルをスキップすることで、「段階的に」動作しようとします。これは脆いですけどね。gwt:run( <superDevMode>false</superDevMode>;なしgwt:run-codeserverlauncherDir) を使用すると、nocache.js が SuperDevMode 固有のバージョンで上書きされgwt:compile、コンパイルがスキップされる可能性があります。

要点は次のとおりです。デプロイまたは「リリース」するときは、最初に実行するmvn clean 、Mavengwt:compileに渡して強制的に実行するようにしてください。-Dgwt.compiler.force

于 2014-11-28T10:53:55.873 に答える
1

参考までに、非標準のプロジェクト構造の使用が原因で、同じ問題が発生しました。

.nocacheMaven が別のディレクトリにファイルをコピーしていたため、プラグインは生成されたファイルを消去/target/できませんでした。clean

ファイルがコピーされるディレクトリに新しいを追加すると、問題が解決します。

于 2015-04-30T08:23:17.667 に答える