class WorkItemDefinitionProjectInstaller {

    @SuppressWarnings("all")
    public void install(final Collection<WorkItemDefinition> items,
                        final Metadata metadata) {
        final Module module = moduleService.resolveModule(metadata.getRoot());
        final Path pomXMLPath = module.getPomXMLPath();
        final POM projectPOM = pomService.load(pomXMLPath);
        if (projectPOM != null) {
            final Dependencies projectDependencies = projectPOM.getDependencies();
            final Set<Dependency> widDependencies = items.stream()
                    .flatMap(wid -> wid.getDependencies().stream())
                    .filter(d -> !projectDependencies.contains(d))
                    .collect(Collectors.toSet());
            projectDependencies.addAll(widDependencies);
            pomService.save(pomXMLPath,
                            projectPOM,
                            metadataService.getMetadata(pomXMLPath),
                            INSALL_MESSAGE,
                            false);
        }
    }

    protected  WorkItemDefinitionProjectInstaller();
    @Inject public  WorkItemDefinitionProjectInstaller(final POMService pomService,
                                              final MetadataService metadataService,
                                              final KieModuleService moduleService);

}