私のアセンブリ記述子には、次のものがあります。
<dependencySets>
<dependencySet>
<outputDirectory>ext</outputDirectory>
<useTransitiveDependencies>false</useTransitiveDependencies>
<excludes>
<exclude>group1:artifact1:jar:${pom.version}</exclude>
<exclude>group2:artifact2:jar:${pom.version}</exclude>
</excludes>
</dependencySet>
</dependencySets>
mvn dependency:treeを実行すると、たとえば次のようになります。
[INFO] +- org.springframework:spring-context:jar:3.0.5.RELEASE:compile
[INFO] | +- org.springframework:spring-aop:jar:3.0.5.RELEASE:compile
[INFO] | | \- aopalliance:aopalliance:jar:1.0:compile
私が達成したいのは、extフォルダーに文字列コンテキストしかないことです。上記のようにuseTransitiveDependenciesを設定すると、 extディレクトリはまったく存在せず、プロパティを削除すると、extフォルダーにすべてのスレッド jar が存在します。
spring-aopとaopallianceを除外する方法を知っている人はいますか?
ジョナス