0

私のアセンブリ記述子には、次のものがあります。

<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-aopaopallianceを除外する方法を知っている人はいますか?

ジョナス

4

5 に答える 5

1

を に設定useTransitiveFilteringtrueます。内部でinclude/を使用する場合は、このオプションを検討する必要があります。excludedependencySet

于 2018-12-06T08:26:17.260 に答える
0

Spring-Contextは、推移的な依存関係ではなく、直接的な依存関係である必要があります。

推移的な依存関係を許可することに同意する場合は、依存関係の選択を依存関係POMに委任します。

于 2013-02-13T10:11:00.417 に答える
-1

Spring-aopとaopallianceを除外する方法を知っている人はいますか?

と:

<exclude>org.springframework:spring-aop:jar:3.0.5.RELEASE</exclude>
<exclude>aopalliance:aopalliance:jar:1.0</exclude>
于 2013-02-13T04:51:55.060 に答える
-2

デバッグフラグを指定してこのMavenコマンドを実行してみましたか?デバッグフラグを付けて実行してください。解決策が見つかります。

于 2013-02-13T04:38:46.630 に答える