Is there anyway to exclude artifacts inherited from a parent POM?

后端 未结 9 1228
礼貌的吻别
礼貌的吻别 2020-11-30 22:02

Artifacts from dependencies can be excluded by declaring an element inside a But in this case it\'s needed to

9条回答
  •  我在风中等你
    2020-11-30 22:33

    Redefine the dependency (in the child pom) with scope system pointing to an empty jar :

    
        dependency.coming
        from.parent
        0
        system
        ${project.basedir}/empty.jar
    
    

    The jar can contain just a single empty file :

    touch empty.txt
    jar cvf empty.txt
    

提交回复
热议问题