2012-08-28 56 views
3

我有這個插件在我pom.file:Maven的罐子,有依賴性不覆蓋文件

 <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中某個文件的相同文件名來存儲一些數據。不幸的是,該插件不會合併的文件,它只是用第二個覆蓋第一個,這使我的應用程序崩潰。

我可以強制maven合併碰巧具有相同名稱(但來自不同依賴關係)的文件嗎?

回答

相關問題