2017-09-05 1 views
2

Maven으로 이동하려는 GWT 프로젝트가 있습니다. 이 코드와 .bat 파일을 실행하는 데 사용 GWT를 컴파일하기 위해, 메이븐을 사용하기 전에GWT-Maven-plugin : 정의 된 디렉토리에 GWT 컴파일 된 파일을 연결하십시오.

는 는

1) :

/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 
기대

두 번째 줄에서 디렉토리가 변경되므로 컴파일 된 파일은 directory으로 생성됩니다. ...\thisFolder\com.myproject.client.gwt.ProjectClient

2) 지금 나는 동일한 작업을 수행하기를 원하지만 GWT-받는다는 - 플러그인를 사용하여, 그래서 내가 찾은 일부 게시물에 따르면, 나는 ...\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' ;-)의 훨씬 오래된 버전 _입니다 ;-) –

관련 문제