2012-08-28 5 views
3

내 pom.file에서이 플러그인이 덮어 쓰지 않습니다메이븐 항아리-와 의존성 파일

 <plugin> 
      <groupId>org.apache.maven.plugins</groupId> 
      <artifactId>maven-assembly-plugin</artifactId> 
      <executions> 
       <execution> 
        <id>package-jar-with-dependencies</id> 
        <phase>package</phase> 
        <goals> 
         <goal>single</goal> 
        </goals> 
        <configuration> 
         <appendAssemblyId>false</appendAssemblyId> 
         <descriptorRefs> 
          <descriptorRef>jar-with-dependencies</descriptorRef> 
         </descriptorRefs> 
         <archive> 
          <manifest> 
           <mainClass>com.doesntwork.App</mainClass> 
          </manifest> 
         </archive> 
        </configuration> 
       </execution> 
      </executions> 
     </plugin> 

이 지금까지 잘 작동합니다. 현재 나의 의존성 중 두 가지는 일부 데이터를 저장하기 위해 META-INF에서 일부 파일의 동일한 파일 이름을 사용합니다. 불행히도 플러그인은 파일을 병합하지 않고 파일을 덮어 쓰지 만 첫 번째 파일을 두 번째 파일로 덮어 쓰면 응용 프로그램이 손상됩니다.

동일한 이름을 가지나 (종속성이 다른 파일) 병합하도록 강제로 적용 할 수 있습니까?

답변