How to exclude a dependency from parent's project in Maven?

前端 未结 6 2207
孤独总比滥情好
孤独总比滥情好 2020-12-24 12:11

For example, I have 2 Maven projects. One is \"project-parent\". The other is \"project-child\". Obviously, \"project-child\" is the sub project of \"project-parent\".

6条回答
  •  自闭症患者
    2020-12-24 12:12

    I have managed to exclude a transient dependency from a parent pom. By re-importing it in and then setting exclusion por the dependency I wanted out. like this eg.:

    
        
            
                org.springframework.boot
                spring-boot-starter-test
                ${spring-boot.version}
                test
                
                    
                        junit
                        junit
                    
                
            
    

提交回复
热议问题