@Test public void createRepositoryGroupWithCfg() throws RepositoryException { RepositoryGroupConfiguration cfg = new RepositoryGroupConfiguration(); cfg.setId("group2"); cfg.setName("Group 2"); cfg.setCronExpression("0 0 03 ? * MON"); cfg.setMergedIndexTtl(504); cfg.setMergedIndexPath(".index-abc"); ArrayList<String> repos = new ArrayList<>(); repos.add("test01"); repos.add("test02"); cfg.setRepositories(repos); RepositoryGroup grp = provider.createRepositoryGroup(cfg); assertEquals("group2", grp.getId()); assertEquals("Group 2", grp.getName()); assertEquals("0 0 03 ? * MON", grp.getSchedulingDefinition()); IndexCreationFeature indexCreationFeature = grp.getFeature( IndexCreationFeature.class ).get(); try { assertEquals(new URI(".index-abc"), indexCreationFeature.getIndexPath()); } catch (URISyntaxException e) { e.printStackTrace(); } assertEquals(504, grp.getMergedIndexTTL()); assertEquals(0, grp.getRepositories().size()); }
@Override public EditableRepositoryGroup createRepositoryGroup(String id, String name) { return createRepositoryGroup(id, name, archivaConfiguration.getRepositoryBaseDir()); }
MavenRepositoryProvider implements RepositoryProvider { @Override public EditableRepositoryGroup createRepositoryGroup(String id, String name) { return createRepositoryGroup(id, name, archivaConfiguration.getRepositoryBaseDir()); } }
MavenRepositoryProvider implements RepositoryProvider { @Override public EditableRepositoryGroup createRepositoryGroup(String id, String name) { return createRepositoryGroup(id, name, archivaConfiguration.getRepositoryBaseDir()); }  }
MavenRepositoryProvider implements RepositoryProvider { @Override public EditableRepositoryGroup createRepositoryGroup(String id, String name) { return createRepositoryGroup(id, name, archivaConfiguration.getRepositoryBaseDir()); }  @Override Set<RepositoryType> provides(); @Override MavenManagedRepository createManagedInstance(String id, String name); MavenManagedRepository createManagedInstance(String id, String name, Path baseDir); @Override MavenRemoteRepository createRemoteInstance(String id, String name); MavenRemoteRepository createRemoteInstance(String id, String name, Path baseDir); @Override EditableRepositoryGroup createRepositoryGroup(String id, String name); MavenRepositoryGroup createRepositoryGroup(String id, String name, Path baseDir); @Override ManagedRepository createManagedInstance(ManagedRepositoryConfiguration cfg); @Override void updateManagedInstance(EditableManagedRepository repo, ManagedRepositoryConfiguration cfg); @Override ManagedRepository createStagingInstance(ManagedRepositoryConfiguration baseConfiguration); @Override RemoteRepository createRemoteInstance(RemoteRepositoryConfiguration cfg); @Override void updateRemoteInstance(EditableRemoteRepository repo, RemoteRepositoryConfiguration cfg); @Override RepositoryGroup createRepositoryGroup(RepositoryGroupConfiguration configuration); @Override void updateRepositoryGroupInstance(EditableRepositoryGroup repositoryGroup, RepositoryGroupConfiguration configuration); @Override RemoteRepositoryConfiguration getRemoteConfiguration(RemoteRepository remoteRepository); @Override ManagedRepositoryConfiguration getManagedConfiguration(ManagedRepository managedRepository); @Override RepositoryGroupConfiguration getRepositoryGroupConfiguration(RepositoryGroup repositoryGroup); ArchivaConfiguration getArchivaConfiguration(); void setArchivaConfiguration(ArchivaConfiguration archivaConfiguration); @Override void handle(Event event); }
MavenRepositoryProvider implements RepositoryProvider { @Override public EditableRepositoryGroup createRepositoryGroup(String id, String name) { return createRepositoryGroup(id, name, archivaConfiguration.getRepositoryBaseDir()); }  @Override Set<RepositoryType> provides(); @Override MavenManagedRepository createManagedInstance(String id, String name); MavenManagedRepository createManagedInstance(String id, String name, Path baseDir); @Override MavenRemoteRepository createRemoteInstance(String id, String name); MavenRemoteRepository createRemoteInstance(String id, String name, Path baseDir); @Override EditableRepositoryGroup createRepositoryGroup(String id, String name); MavenRepositoryGroup createRepositoryGroup(String id, String name, Path baseDir); @Override ManagedRepository createManagedInstance(ManagedRepositoryConfiguration cfg); @Override void updateManagedInstance(EditableManagedRepository repo, ManagedRepositoryConfiguration cfg); @Override ManagedRepository createStagingInstance(ManagedRepositoryConfiguration baseConfiguration); @Override RemoteRepository createRemoteInstance(RemoteRepositoryConfiguration cfg); @Override void updateRemoteInstance(EditableRemoteRepository repo, RemoteRepositoryConfiguration cfg); @Override RepositoryGroup createRepositoryGroup(RepositoryGroupConfiguration configuration); @Override void updateRepositoryGroupInstance(EditableRepositoryGroup repositoryGroup, RepositoryGroupConfiguration configuration); @Override RemoteRepositoryConfiguration getRemoteConfiguration(RemoteRepository remoteRepository); @Override ManagedRepositoryConfiguration getManagedConfiguration(ManagedRepository managedRepository); @Override RepositoryGroupConfiguration getRepositoryGroupConfiguration(RepositoryGroup repositoryGroup); ArchivaConfiguration getArchivaConfiguration(); void setArchivaConfiguration(ArchivaConfiguration archivaConfiguration); @Override void handle(Event event);  }