开发者

Exclude whole parent dependency

开发者 https://www.devze.com 2023-03-13 07:00 出处:网络
The parent pom has got the following dependencies <dependencies> <dependency> <groupId>tv.my</groupId>

The parent pom has got the following dependencies

<dependencies>
    <dependency>
        <groupId>tv.my</groupId>
        <artifactId>cable</artifactId>
    </dependency>
    <dependency>
        <groupId>tv.my</groupId>
        <artifactId>sat</artifactId>
    </dependency>
</dependencies>

In the child's pom I want to exclude the whole tv.my:sat dependency. Maybe with something like this:

<dependencies>
    <excludes>
        <exlude>
            <dependency>
                <groupId>tv.my</groupI开发者_如何学JAVAd>
                <artifactId>cable</artifactId>
            </dependency>
        <exlude>
    <excludes>
</dependencies>

Is this somehow possible?


You have no choice but to repair the parent POM to use dependencyManagement correctly. Dependencies in parent poms are almost never a good idea, and once you use a parent that has them, you are stuck.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号