class ArchetypeServiceImpl implements ArchetypeService {

    Path unpackArchetype(final Repository repository) {
        try {
            final Path targetDirectoryPath = createTempDirectory(TEMPLATE);

            final File targetDirectory = new File(targetDirectoryPath.toString());

            final File repositoryDirectory = resolveRepositoryDirectory(repository);

            cloneRepository(repositoryDirectory,
                            targetDirectory.getAbsoluteFile());

            return targetDirectoryPath;
        } catch (Exception e) {
            final String msg = String.format("Failed to unpack the repository %s",
                                             repository.getAlias());
            LOGGER.error(msg, e);
            throw new IllegalStateException(msg);
        }
    }

    public  ArchetypeServiceImpl();
    @Inject public  ArchetypeServiceImpl(final @Named("ioStrategy") IOService ioService,
                                final RepositoryService repositoryService,
                                final OrganizationalUnitService ouService,
                                final Event<ArchetypeListUpdatedEvent> archetypeListUpdatedEvent,
                                final ArchetypeConfigStorage archetypeConfigStorage,
                                final PathUtil pathUtil,
                                final ArchetypePreferencesManager archetypePreferencesManager,
                                final KieModuleService moduleService,
                                final POMService pomService);

}