return result;
}
public static ArtifactRepository convertFromMavenSettingsRepository(Repository repository)
{
MavenArtifactRepository result = new MavenArtifactRepository();
result.setId(repository.getId());
result.setUrl(repository.getUrl());
String layout = repository.getLayout();
if ("default".equals(layout))
result.setLayout(new DefaultRepositoryLayout());
else if ("p2".equals(layout))
result.setLayout(new P2ArtifactRepositoryLayout());
RepositoryPolicy releases = repository.getReleases();
if (releases != null)
result.setReleaseUpdatePolicy(new ArtifactRepositoryPolicy(releases.isEnabled(), releases.getUpdatePolicy(),
releases.getChecksumPolicy()));
RepositoryPolicy snapshots = repository.getSnapshots();
if (snapshots != null)
result.setSnapshotUpdatePolicy(new ArtifactRepositoryPolicy(snapshots.isEnabled(),
snapshots.getUpdatePolicy(),
snapshots.getChecksumPolicy()));
return result;
}