use of org.kie.workbench.common.screens.archetype.mgmt.shared.exceptions.ArchetypeAlreadyExistsException in project kie-wb-common by kiegroup.
the class ArchetypeServiceImpl method addInternalTemplate.
private void addInternalTemplate(final Path workingDirectoryPath, final GAV templateGav) {
try {
appendTemplateSuffix(templateGav);
checkArchetypeAlreadyAdded(templateGav);
final File workingDirectory = new File(workingDirectoryPath.toString());
checkModuleValid(workingDirectoryPath.resolve(templateGav.getArtifactId()));
finishAddArchetype(templateGav, workingDirectory, true);
} catch (ArchetypeAlreadyExistsException e) {
// It is ok, nothing to do here
} catch (Exception e) {
LOGGER.error(String.format("Failed to add internal template %s", templateGav.toString()), e);
}
}
Aggregations