final String version,
final List<RemoteRepository> repositories) throws DependencyCollectionException,
DependencyResolutionException,
SettingsBuildingException {
RepositorySystemSession session = newSession(repositorySystem,
workspaceReader,
SettingsUtil.getLocalRepositoryLocation(effectiveSettings));
DefaultArtifact artifact = new DefaultArtifact(groupId, artifactId, classifier, extension, version);
Dependency dependency = new Dependency(artifact, JavaScopes.RUNTIME);