private void resolveVersions(List<Dependency> deps, List<Dependency> management) {
        for (Dependency parentDep: management) {
            for (Dependency dependency: deps) {
                if (dependency.getVersion() == null || !dependency.isScopeDefined()) {
                    if (dependency.getGroupId().equals(parentDep.getGroupId()) &&
                        dependency.getArtifactId().equals(parentDep.getArtifactId()) &&
                        dependency.getType().equals(parentDep.getType())) {

                        if (dependency.getVersion() == null) {
                            //System.out.println("In " + getThisPom() + " - resolve version to " + parentDep.getVersion() + " for " +
                            //  dependency.getGroupId() + ":" + dependency.getArtifactId() + " according to parent POM");
                            dependency.setVersion(parentDep.getVersion());
                        }
                        if (!dependency.isScopeDefined()) {
                            dependency.setScope(parentDep.getScope());
                        }

                        break;
                    }
                }
            }
        }
    }