Ejemplo n.º 1
0
 public static org.apache.maven.model.Repository fromSettingsRepository(
     org.apache.maven.settings.Repository settingsRepository) {
   org.apache.maven.model.Repository modelRepository = new org.apache.maven.model.Repository();
   modelRepository.setId(settingsRepository.getId());
   modelRepository.setLayout(settingsRepository.getLayout());
   modelRepository.setName(settingsRepository.getName());
   modelRepository.setUrl(settingsRepository.getUrl());
   modelRepository.setReleases(fromSettingsRepositoryPolicy(settingsRepository.getReleases()));
   modelRepository.setSnapshots(fromSettingsRepositoryPolicy(settingsRepository.getSnapshots()));
   return modelRepository;
 }
Ejemplo n.º 2
0
  public Repository toRepository() {
    Repository result = new Repository();
    result.setId(myId);
    result.setName(myName);
    result.setUrl(myUrl);
    result.setLayout(myLayout);

    if (myReleasesPolicy != null) result.setReleases(myReleasesPolicy.toRepositoryPolicy());
    if (mySnapshotsPolicy != null) result.setSnapshots(mySnapshotsPolicy.toRepositoryPolicy());

    return result;
  }