2012-03-20 5 views
0

Maven에서 다음을 달성 할 수있는 방법이 있습니까? Maven에 의해 빌드 된 마지막 jar 파일에서 파일 (아래 META-INF/services/org/apache/camel/TypeConverter 참조)을 제외하고 싶습니다.선택한 종속성에 대해서만 파일을 제외하는 방법

drools-camel-5.3.0.Final.jar 
+-- META-INF 
    +-- services 
    +-- org 
     +-- apache 
     +-- camel 
      +-- component 
      +-- TypeConverter 

나는 다음과 같은 것을 사용할 수 있습니다

<build> 
    <plugins> 
    <plugin> 
     <groupId>org.apache.maven.plugins</groupId> 
     <artifactId>maven-jar-plugin</artifactId> 
     <configuration> 
     <excludes> 
      <exclude>**/TypeConverter</exclude> 
     </excludes> 
     </configuration> 
    </plugin> 
    </plugins> 
</build> 

그러나, 그래서 TypeConverter 파일을 일에 (두 예제 내가 아래 한 포함) 모든 항아리에서 제외됩니다. 나는 그것을 원하지 않는다. TypeConverter은 선택한 병에서 제외해야합니다 (이 경우 drools-camel-5.3.0.Final.jar 만 해당).

Maven에서 가능한가요? 그렇다면 어떻게? 현재 모든 의존성과 플러그인을 가진 pom.xml 파일이 하나뿐입니다. 당신은 메이븐 shade-plugin 이것을 달성 할 수

camel-http-2.10-SNAPSHOT.jar 
+-- META-INF 
    +-- services 
    +-- org 
     +-- apache 
     +-- camel 
      +-- component 
      +-- TypeConverter 

camel-twitter-2.10-SNAPSHOT.jar 
+-- META-INF 
    +-- services 
    +-- org 
     +-- apache 
     +-- camel 
      +-- component 
      +-- TypeConverter 

답변

0

는, 자세한 내용은 here를보십시오.

관련 문제