2017-09-05 10 views
2

私はMavenに移動したいGWTプロジェクトを持っています。 Mavenを使用する前にGWT-Maven-plugin:GWTコンパイル済みファイルを定義済みのディレクトリにリンクします。

1)、GWTをコンパイルするために、私はこのコードでの.batファイルを実行するために使用:

/thisFolderがコンパイルされたファイルのディレクトリである私は

call env 
cd "\thisFolder" 
%JAVA_HOME_GWT%/java -Xmx1024m -Dgwt.nowarn.legacy.tools -cp %GWT_HOME%/gwt-user.jar;%GWT_HOME%/gwt-dev.jar;%GWT_HOME%/validation-api-1.0.0.GA.jar;%GWT_HOME%/validation-api-1.0.0.GA-sources.jar;%GWT_EXT%/gwtext.jar" com.google.gwt.dev.Compiler -war "%URL_PROJECT_BASE%/%URL_COMPILE_PROJECT_CLIENT%" %* -style OBF com.myproject.client.gwt.ProjectClient 
pause 
を期待します

2行目でディレクトリが変更されるので、コンパイルされたファイルはdirectoryに作成されます。...\thisFolder\com.myproject.client.gwt.ProjectClient

2)今すぐ私は同じことをやってみたいが、GWT-のmaven-pluginのを使用しているので、私が見つけたいくつかの記事によると、私は...\thisFolder

These are some of the labels I tried to use: 

- <hostedWebapp>${project.build.directory}/thisFolder</hostedWebapp> 
- <extraJvmArgs>-Djava.io.tmpdir=${project.build.directory}/thisFolder</extraJvmArgs> 
- <outputDirectory>${project.build.directory}/thisFolder</outputDirectory> 
- <war>${project.build.directory}/thisFolder</war> 
- <deploy>${project.build.directory}/thisFolder</deploy> 

*.cache.htmlファイルの出力ディレクトリを設定するために、プラグインの設定にいくつかの変更を行いましたしかし、GWTをコンパイルした後、directoryというメッセージが表示され、*.cache.html (or *.cache.js)が置かれていて、(このコンソール出力の最終行)であると思われるパスではありません

[INFO]  Compiling permutation 10... 
[INFO]   Compiling 
[INFO]    Compiling permutation 11... 
[INFO]   Compiling 
[INFO]    Compiling permutation 12... 
[INFO]   Compiling 
[INFO]    Compiling permutation 13... 
[INFO]  Compiling permutation 14... 
[INFO] Compile of permutations succeeded 
[INFO] Compilation succeeded -- 54,216s 
[INFO] Linking into D:\Java\MyProject\mainProject\target\mainProject\com.myproject.client.gwt.ProjectClient 

その*.cache.htmlファイルの出力ディレクトリを設定するための適切な方法は何ですか?


これはpom.xml GWTプラグインの設定です:https://gwt-maven-plugin.github.io/gwt-maven-plugin/compile-mojo.htmlでドキュメントから

<plugin> 
    <groupId>org.codehaus.mojo</groupId> 
    <artifactId>gwt-maven-plugin</artifactId> 
    <version>${gwt.version}</version> 
    <executions> 
     <execution> 
      <goals> 
       <goal>compile</goal> 
       <goal>generateAsync</goal> 
       <goal>test</goal> 
      </goals> 
     </execution> 
    </executions> 
    <configuration> 
     <extraJvmArgs>-Xmx1024m -Xss1024k -Dgwt.nowarn.legacy.tools</extraJvmArgs> 
     <draftCompile>true</draftCompile> 
     <debugSuspend>false</debugSuspend> 
     <logLevel>INFO</logLevel> 
     <style>OBF</style> 
     <noServer>true</noServer> 
     <runTarget>http://localhost:${glassfish.port}/${project.build.finalName}/${project.build.finalName}.html</runTarget> 
     <buildOutputDirectory>${project.build.outputDirectory}</buildOutputDirectory> 
     <deploy>${project.build.outputDirectory}/deploy</deploy> 
     <copyWebapp>true</copyWebapp> 
    </configuration> 
</plugin> 

答えて

1

webappDirectoryファイル - GWTは、出力ファイルを書き込みます。ファイルシステム上の場所(-out GWTCompilerのオプション)。 デフォルト値は$ {project.build.directory}/$ {project.build.finalName}です。 ユーザープロパティは:gwt.warです。

あなたは、私が-outのかなり古いバージョンであると考えており、代わりに-warを使用しているように見えるが、あなたの設定に<webappDirectory>${project.build.directory}/thisFolder</webappDirectory>を追加すると、所望の結果を達成する必要があります。

+1

実際には、 '-out'と' GWTCompiler'は '-war'と' Compiler' ;-)の古いバージョン_です。 –

関連する問題