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文件。
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