this.type = type;
}
public void execute() throws MissingDependencyException, IOException {
Artifact configId = new Artifact(groupId, artifactId, version, type);
Repository sourceRepository = new Maven1Repository(sourceRepositoryFile);
WriteableRepository targetRepository = new Maven2Repository(targetRepositoryFile);
if (!sourceRepository.contains(configId)) {
throw new MissingDependencyException("source repository at " + sourceRepositoryFile + " does not contain artifact " + configId);
}
if (!targetRepository.contains(configId)) {
File sourceFile = sourceRepository.getLocation(configId);
targetRepository.copyToRepository(sourceFile, configId, BaseConfigInstaller.LOG_COPY_START);
}
}