2011-01-04 1 views
2

war 파일을 빌드하는 maven 프로젝트가 있습니다.Maven YUI Compressor Plugin 프로세스 리소스 단계가 실행되지 않습니까?

yui 압축기를 내 maven 빌드 파일에 포함시키는 것은 src/main/resources /에있는 js 파일과 관련이없는 파일의 원인입니다. 대상 디렉토리에 복사 될 때 프로세스 자원이 비어있는 동안 처리됩니다. 참으로 이상한. yuicompressor 플러그인이주기에서 제거되면 다른 리소스도 올바르게 처리됩니다.

본 사람 (제발, 예라고 ;-))? 여기

내 설정이다 :

유이 압축기 설정 :

<resources> 
     <resource> 
      <directory>src/main/resources</directory> 
      <filtering>true</filtering> 
      <includes> 
       <include>**/*.properties</include> 
       <include>**/*.xml</include> 
      </includes> 
     </resource> 
    </resources> 

대상 : 대상 디렉토리에 복사 할 때 비어있는 파일을 포함

<plugin> 
      <groupId>net.alchim31.maven</groupId> 
      <artifactId>yuicompressor-maven-plugin</artifactId> 
      <version>1.1</version> 
      <executions> 
       <execution> 
        <goals> 
         <goal>compress</goal> 
        </goals> 
        <phase>process-resources</phase> 
       </execution> 
      </executions> 
      <configuration> 
       <excludes> 
        <exclude>**/extjs*/**/*.js</exclude> 
        <exclude>**/extjs*/**/*.css</exclude> 
       </excludes> 
       <nosuffix>true</nosuffix> 
      </configuration> 
     </plugin> 

그리고 자원 설정, repeat : resources 디렉토리의 파일 (log4j.xml 등)이 대상 디렉토리로 복사되지만 비어 있습니다.

도움 주셔서 감사합니다.

답변

1

YUI Compressor 플러그인은 암시 적으로 압축하기 위해 포함 할 위치 중 하나 인 resources 디렉토리가 있습니다. 자원 플러그인 실행 후 빈 파일 (xml 및 .properties 파일에 javascript가 포함되어 있지 않음)로 자원 디렉토리의 xml 및 .properties 파일을 덮어 씁니다. 내 수정 플러그인의 설정에 새로운 제외를 추가했다 : XML 또는 .properties의 접미사없이 자원이 여전히 유이 압축기에 의해 구문 분석 할 수 있기 때문에

<excludes> 
        <exclude>**/*.xml</exclude> <!-- <-- this one here --> 
        <exclude>**/*.properties</exclude> <!-- <-- and this one --> 
        <exclude>**/extjs*/**/*.js</exclude> 
        <exclude>**/extjs*/**/*.css</exclude> 
       </excludes> 

이것은, 그러나, 이상적 여전히 작다; 나는 원래의 문제로 돌아왔다.

나는이 제외했지만, 그것은 작동하지 않았다

<exclude>**/resources/*.*</exclude> 

사람이 위의 작업, 또는 어떻게하지에 유이 플러그인 에게 아이디어가없는 이유 어떤 생각을 가지고 않습니다 자원의 모든 것을 처리 하는가?