/** * Avoids dependency cycles. * * <p> * People often write configuration in parent POMs that use the plugin * which is a part of the build. To avoid this kind of dependency, * make sure parent POMs don't depend on a child module. */ /*package*/ void cutCycle() { ModuleDependency dep = asDependency(); for(PomInfo p=parent; p!=null; p=p.parent) { if(p.dependencies.contains(dep)) p.dependencies.remove(dep); } }
/** * Avoids dependency cycles. * * <p> * People often write configuration in parent POMs that use the plugin * which is a part of the build. To avoid this kind of dependency, * make sure parent POMs don't depend on a child module. */ /*package*/ void cutCycle() { ModuleDependency dep = asDependency(); for(PomInfo p=parent; p!=null; p=p.parent) { if(p.dependencies.contains(dep)) p.dependencies.remove(dep); } }
dependencies.add(new ModuleDependency(parentProject)); if(parent!=null) dependencies.add(parent.asDependency()); dependencies.remove(asDependency());
dependencies.add(new ModuleDependency(parentProject)); if(parent!=null) dependencies.add(parent.asDependency()); dependencies.remove(asDependency());