2011-12-18 4 views
2

안녕하세요 gwt 애플리케이션을 작성하고 패키징하는 것을 자동화하는 그루비 스크립트를 만드는 중입니다.Ant, Groovy, GWT AntBuilder로 GWT 컴파일하기

AntBuilder는 Groovy의 일부로 번들로 제공되며 개념을 정말 좋아합니다. 결과 스크립트의 가독성을 높이는 데 실제로 도움이됩니다.

그러나 GWT 컴파일러를 호출하기 위해 스크립트를 만드는 데 문제가 있습니다. 다음과 같이 코드는 다음과 같습니다.

ant.sequential{ 

    path(id:"gwt.path" , location:"src", { fileset (dir:"${GWT_HOME}", includes:"gwt-dev.jar") }  ) 

    ant.java (fork:true, maxmemory:"256M", classpathref:"gwt.path", classname:"com.google.gwt.dev.Compiler" 
     , { classpath { pathelement location:"src" } 
       classpath { pathelement location:"${GWT_HOME}/gwt-user.jar" } 
       classpath { pathelement location:"${WEB_INF}/classes" } 
       arg (value:"-war") 
       arg (value:"bin/www") 
       arg (value:"com/xxx/xxx/xx/xxx/xxx/GWT_DuplicateFinder") 
       } 
     ) 
} 

를 지금까지 내가 내가 제대로에 해당하는 개미 스크립트로 변환 (다른 GWT 프로젝트에 사용되는 이전 build.xml 파일에서 붙여 넣은 말할 수

<target name="web" depends="compile" description="GWT Web Compilation"> 
    <mkdir dir="${gwt.web.out.dir}"/> 
    <java fork="true" maxmemory="256M" classpathref="gwt.path" classname="com.google.gwt.dev.Compiler"> 
    <classpath> 
      <pathelement location="src"/> 
      <!-- Note the reference to the compiled java classes --> 
      <pathelement location="war/WEB-INF/classes"/> 
     </classpath> 

     <arg value="-war"/> 
     <arg value="bin/www"/> 
     <arg value="com/xxx/xxx/xx/xxx/xxx/GWT_DuplicateFinder"/> 
    </java> 
    </target> 

내가 갖는 오류는 다음과 같습니다.

[java] [ERROR] Unable to find 'com/xxx/xxx/xx/xxx/xxx/GWT_DuplicateFinder.gwt.xml' on your classpath; could be a typo, or maybe you forgot to include a classpath entry for source? 

내가 잘못거야 어디 사람이 말해 줄 수

답변

0

GWT 컴파일러는 GWT_DuplicateFinder.gwt.xml 파일을 볼 수 없기 때문에 경로에 문제가있을 것입니다. 경로에 src 폴더가 있습니다. 괜찮습니다. 어쩌면 기본 디렉토리 나 작업 디렉토리가 정확하지 않을 수도 있습니다.