Search in sources :

Example 16 with Group

use of org.commonjava.indy.model.core.Group in project indy by Commonjava.

the class AutoProxDataManagerDecoratorTest method groupAutoCreatedWithDeployPointAndTwoRepos.

@Test
public void groupAutoCreatedWithDeployPointAndTwoRepos() throws Exception {
    simpleCatalog();
    final String testUrl = http.formatUrl("target", "test");
    http.expect(testUrl + "/", 200, "");
    http.expect(http.formatUrl("target", "first/"), 200, "");
    http.expect(http.formatUrl("target", "second/"), 200, "");
    catalog.setEnabled(false);
    assertThat(storeQuery.getGroup("test"), nullValue());
    catalog.setEnabled(true);
    final Group group = storeQuery.getGroup("test");
    assertThat(group, notNullValue());
    assertThat(group.getName(), equalTo("test"));
    final List<StoreKey> constituents = group.getConstituents();
    logger.info("Group constituents: {}", constituents);
    assertThat(constituents, notNullValue());
    assertThat(constituents.size(), equalTo(4));
    int idx = 0;
    StoreKey key = constituents.get(idx);
    assertThat(key.getType(), equalTo(StoreType.hosted));
    assertThat(key.getName(), equalTo("test"));
    idx++;
    key = constituents.get(idx);
    assertThat(key.getType(), equalTo(StoreType.remote));
    assertThat(key.getName(), equalTo("test"));
    idx++;
    key = constituents.get(idx);
    assertThat(key.getType(), equalTo(StoreType.remote));
    assertThat(key.getName(), equalTo("first"));
    idx++;
    key = constituents.get(idx);
    assertThat(key.getType(), equalTo(StoreType.remote));
    assertThat(key.getName(), equalTo("second"));
}
Also used : Group(org.commonjava.indy.model.core.Group) StoreKey(org.commonjava.indy.model.core.StoreKey) Test(org.junit.Test)

Example 17 with Group

use of org.commonjava.indy.model.core.Group in project indy by Commonjava.

the class RoutedCacheProviderForGroupTest method addGroupAndNFSSetup.

@Test
public void addGroupAndNFSSetup() throws Exception {
    final String content = "This is a test: " + System.nanoTime();
    final InputStream stream = new ByteArrayInputStream(content.getBytes());
    final String path = "/path/to/foo.class";
    final String hostedName1 = "test1";
    final HostedRepository hostedRepo1 = this.client.stores().create(new HostedRepository(hostedName1), "create group", HostedRepository.class);
    final File nfsStorage1 = Paths.get(fixture.getBootOptions().getIndyHome(), NFS_BASE, MAVEN_PKG_KEY, hosted.singularEndpointName() + "-" + hostedName1, path).toFile();
    final String gname = newName();
    Group g = this.client.stores().create(new Group(gname), "create group", Group.class);
    g.addConstituent(hostedRepo1);
    this.client.stores().update(g, "update group");
    assertThat(client.content().exists(hosted, hostedName1, path), equalTo(false));
    assertThat(nfsStorage1.exists(), equalTo(false));
    client.content().store(group, gname, path, stream);
    assertThat(client.content().exists(hosted, hostedName1, path), equalTo(true));
    //TODO: seems that the nfs store is created here even if the store operation is on a group repo with a hosted repo in
    //      doubt that the store operation is recursively called on the sub constituent of this group, so the hosted repo
    //      in this group then do the store through the FastLocal, so the nfs one is created. Not sure if this is a right
    //      case.
    assertThat(nfsStorage1.exists(), equalTo(true));
}
Also used : Group(org.commonjava.indy.model.core.Group) ByteArrayInputStream(java.io.ByteArrayInputStream) ByteArrayInputStream(java.io.ByteArrayInputStream) InputStream(java.io.InputStream) File(java.io.File) HostedRepository(org.commonjava.indy.model.core.HostedRepository) Test(org.junit.Test) AbstractContentManagementTest(org.commonjava.indy.ftest.core.AbstractContentManagementTest)

Example 18 with Group

use of org.commonjava.indy.model.core.Group in project indy by Commonjava.

the class MavenMetadataGenerator method mergeMissing.

private MetadataIncrementalResult mergeMissing(final Group group, final MetadataIncrementalResult incrementalResult, final String toMergePath, String description, BiFunction<ArtifactStore, String, Callable<MetadataResult>> func) throws IndyWorkflowException {
    Set<ArtifactStore> missing = incrementalResult.missing;
    Metadata master = incrementalResult.result;
    logger.debug("Merge member metadata for {}, {}, missing: {}, size: {}", group.getKey(), description, missing, missing.size());
    DrainingExecutorCompletionService<MetadataResult> svc = new DrainingExecutorCompletionService<>(mavenMDGeneratorService);
    detectOverloadVoid(() -> missing.forEach(store -> svc.submit(func.apply(store, toMergePath))));
    // return stores failed download
    Set<ArtifactStore> resultingMissing = new HashSet<>();
    Set<StoreKey> included = new HashSet<>();
    try {
        svc.drain(mr -> {
            if (mr != null) {
                if (mr.missing) {
                    resultingMissing.add(mr.store);
                } else {
                    included.add(mr.store.getKey());
                    merger.merge(master, mr.metadata, group, toMergePath);
                    putToMetadataCache(mr.store.getKey(), toMergePath, new MetadataInfo(mr.metadata));
                }
            }
        });
    } catch (InterruptedException e) {
        logger.debug("Interrupted while merging " + description + " member metadata.");
    } catch (ExecutionException e) {
        throw new IndyWorkflowException("Failed to merge downloaded " + description + " member metadata.", e);
    }
    return new MetadataIncrementalResult(resultingMissing, included, master);
}
Also used : HTTP_METADATA_EXT(org.commonjava.maven.galley.io.SpecialPathConstants.HTTP_METADATA_EXT) Date(java.util.Date) BiFunction(java.util.function.BiFunction) MergedContentAction(org.commonjava.indy.content.MergedContentAction) PathUtils.normalize(org.commonjava.maven.galley.util.PathUtils.normalize) StringUtils(org.apache.commons.lang3.StringUtils) WeftExecutorService(org.commonjava.cdi.util.weft.WeftExecutorService) GROUP_METADATA_GENERATED(org.commonjava.indy.core.content.group.GroupMergeHelper.GROUP_METADATA_GENERATED) WeftManaged(org.commonjava.cdi.util.weft.WeftManaged) TransferOperation(org.commonjava.maven.galley.model.TransferOperation) Document(org.w3c.dom.Document) TraceManager.addFieldToActiveSpan(org.commonjava.o11yphant.trace.TraceManager.addFieldToActiveSpan) Map(java.util.Map) StoreKey(org.commonjava.indy.model.core.StoreKey) Instance(javax.enterprise.inject.Instance) GROUP_METADATA_EXISTS(org.commonjava.indy.core.content.group.GroupMergeHelper.GROUP_METADATA_EXISTS) ArtifactPathInfo(org.commonjava.atlas.maven.ident.util.ArtifactPathInfo) GroupMergeHelper(org.commonjava.indy.core.content.group.GroupMergeHelper) MavenMetadataMerger(org.commonjava.indy.pkg.maven.content.group.MavenMetadataMerger) ConcreteResource(org.commonjava.maven.galley.model.ConcreteResource) StoreType(org.commonjava.indy.model.core.StoreType) Set(java.util.Set) Collectors(java.util.stream.Collectors) IOUtils(org.apache.commons.io.IOUtils) List(java.util.List) EventMetadata(org.commonjava.maven.galley.event.EventMetadata) Metadata(org.apache.maven.artifact.repository.metadata.Metadata) LOCAL_SNAPSHOT_VERSION_PART(org.commonjava.atlas.maven.ident.util.SnapshotUtils.LOCAL_SNAPSHOT_VERSION_PART) PostConstruct(javax.annotation.PostConstruct) XMLInfrastructure(org.commonjava.maven.galley.maven.parse.XMLInfrastructure) DirectContentAccess(org.commonjava.indy.content.DirectContentAccess) PoolUtils.detectOverloadVoid(org.commonjava.indy.core.ctl.PoolUtils.detectOverloadVoid) Plugin(org.apache.maven.artifact.repository.metadata.Plugin) ByteArrayOutputStream(java.io.ByteArrayOutputStream) MetadataXpp3Writer(org.apache.maven.artifact.repository.metadata.io.xpp3.MetadataXpp3Writer) Locker(org.commonjava.cdi.util.weft.Locker) MavenMetadataProvider(org.commonjava.indy.pkg.maven.content.group.MavenMetadataProvider) HashMap(java.util.HashMap) Callable(java.util.concurrent.Callable) AtomicReference(java.util.concurrent.atomic.AtomicReference) VersionUtils(org.commonjava.atlas.maven.ident.util.VersionUtils) Group(org.commonjava.indy.model.core.Group) ArrayList(java.util.ArrayList) Inject(javax.inject.Inject) HashSet(java.util.HashSet) SnapshotVersion(org.apache.maven.artifact.repository.metadata.SnapshotVersion) Transfer(org.commonjava.maven.galley.model.Transfer) Measure(org.commonjava.o11yphant.metrics.annotation.Measure) ExecutorConfig(org.commonjava.cdi.util.weft.ExecutorConfig) IndyWorkflowException(org.commonjava.indy.IndyWorkflowException) TypeAndClassifier(org.commonjava.atlas.maven.ident.ref.TypeAndClassifier) GalleyMavenXMLException(org.commonjava.maven.galley.maven.parse.GalleyMavenXMLException) PathUtils.parentPath(org.commonjava.maven.galley.util.PathUtils.parentPath) DrainingExecutorCompletionService(org.commonjava.cdi.util.weft.DrainingExecutorCompletionService) SnapshotPart(org.commonjava.atlas.maven.ident.version.part.SnapshotPart) MetadataXpp3Reader(org.apache.maven.artifact.repository.metadata.io.xpp3.MetadataXpp3Reader) OutputStream(java.io.OutputStream) Versioning(org.apache.maven.artifact.repository.metadata.Versioning) LocationUtils(org.commonjava.indy.util.LocationUtils) ArtifactStore(org.commonjava.indy.model.core.ArtifactStore) UTF_8(java.nio.charset.StandardCharsets.UTF_8) TraceManager(org.commonjava.o11yphant.trace.TraceManager) IOUtils.closeQuietly(org.apache.commons.io.IOUtils.closeQuietly) IOException(java.io.IOException) SnapshotUtils.generateUpdateTimestamp(org.commonjava.atlas.maven.ident.util.SnapshotUtils.generateUpdateTimestamp) SimpleTypeAndClassifier(org.commonjava.atlas.maven.ident.ref.SimpleTypeAndClassifier) SnapshotUtils(org.commonjava.atlas.maven.ident.util.SnapshotUtils) NotFoundCache(org.commonjava.maven.galley.spi.nfc.NotFoundCache) File(java.io.File) ExecutionException(java.util.concurrent.ExecutionException) Element(org.w3c.dom.Element) StringReader(java.io.StringReader) Paths(java.nio.file.Paths) TypeMapper(org.commonjava.maven.galley.maven.spi.type.TypeMapper) StoreResource(org.commonjava.indy.content.StoreResource) SnapshotUtils.getCurrentTimestamp(org.commonjava.atlas.maven.ident.util.SnapshotUtils.getCurrentTimestamp) TypeMapping(org.commonjava.maven.galley.model.TypeMapping) SingleVersion(org.commonjava.atlas.maven.ident.version.SingleVersion) AbstractMergedContentGenerator(org.commonjava.indy.core.content.AbstractMergedContentGenerator) Collections(java.util.Collections) StoreDataManager(org.commonjava.indy.data.StoreDataManager) InputStream(java.io.InputStream) EventMetadata(org.commonjava.maven.galley.event.EventMetadata) Metadata(org.apache.maven.artifact.repository.metadata.Metadata) StoreKey(org.commonjava.indy.model.core.StoreKey) DrainingExecutorCompletionService(org.commonjava.cdi.util.weft.DrainingExecutorCompletionService) ArtifactStore(org.commonjava.indy.model.core.ArtifactStore) IndyWorkflowException(org.commonjava.indy.IndyWorkflowException) ExecutionException(java.util.concurrent.ExecutionException) HashSet(java.util.HashSet)

Example 19 with Group

use of org.commonjava.indy.model.core.Group in project indy by Commonjava.

the class MavenMetadataGenerator method mergeProviderMetadata.

private Metadata mergeProviderMetadata(final Group group, final Metadata master, final String toMergePath) throws IndyWorkflowException {
    logger.debug("Merge metadata for non-store providers in: {} on path: {}", group.getKey(), toMergePath);
    DrainingExecutorCompletionService<Metadata> svc = new DrainingExecutorCompletionService<>(mavenMDGeneratorService);
    detectOverloadVoid(() -> metadataProviders.forEach(provider -> svc.submit(() -> {
        try {
            return provider.getMetadata(group.getKey(), toMergePath);
        } catch (IndyWorkflowException e) {
            logger.error(String.format("Cannot read metadata: %s from metadata provider: %s. Reason: %s", toMergePath, provider.getClass().getSimpleName(), e.getMessage()), e);
        }
        return null;
    })));
    try {
        svc.drain(metadata -> {
            if (metadata != null) {
                merger.merge(master, metadata, group, toMergePath);
            }
        });
    } catch (InterruptedException e) {
        logger.debug("Interrupted while merging provider member metadata.");
    } catch (ExecutionException e) {
        throw new IndyWorkflowException("Failed to merge provider member metadata.", e);
    }
    return master;
}
Also used : HTTP_METADATA_EXT(org.commonjava.maven.galley.io.SpecialPathConstants.HTTP_METADATA_EXT) Date(java.util.Date) BiFunction(java.util.function.BiFunction) MergedContentAction(org.commonjava.indy.content.MergedContentAction) PathUtils.normalize(org.commonjava.maven.galley.util.PathUtils.normalize) StringUtils(org.apache.commons.lang3.StringUtils) WeftExecutorService(org.commonjava.cdi.util.weft.WeftExecutorService) GROUP_METADATA_GENERATED(org.commonjava.indy.core.content.group.GroupMergeHelper.GROUP_METADATA_GENERATED) WeftManaged(org.commonjava.cdi.util.weft.WeftManaged) TransferOperation(org.commonjava.maven.galley.model.TransferOperation) Document(org.w3c.dom.Document) TraceManager.addFieldToActiveSpan(org.commonjava.o11yphant.trace.TraceManager.addFieldToActiveSpan) Map(java.util.Map) StoreKey(org.commonjava.indy.model.core.StoreKey) Instance(javax.enterprise.inject.Instance) GROUP_METADATA_EXISTS(org.commonjava.indy.core.content.group.GroupMergeHelper.GROUP_METADATA_EXISTS) ArtifactPathInfo(org.commonjava.atlas.maven.ident.util.ArtifactPathInfo) GroupMergeHelper(org.commonjava.indy.core.content.group.GroupMergeHelper) MavenMetadataMerger(org.commonjava.indy.pkg.maven.content.group.MavenMetadataMerger) ConcreteResource(org.commonjava.maven.galley.model.ConcreteResource) StoreType(org.commonjava.indy.model.core.StoreType) Set(java.util.Set) Collectors(java.util.stream.Collectors) IOUtils(org.apache.commons.io.IOUtils) List(java.util.List) EventMetadata(org.commonjava.maven.galley.event.EventMetadata) Metadata(org.apache.maven.artifact.repository.metadata.Metadata) LOCAL_SNAPSHOT_VERSION_PART(org.commonjava.atlas.maven.ident.util.SnapshotUtils.LOCAL_SNAPSHOT_VERSION_PART) PostConstruct(javax.annotation.PostConstruct) XMLInfrastructure(org.commonjava.maven.galley.maven.parse.XMLInfrastructure) DirectContentAccess(org.commonjava.indy.content.DirectContentAccess) PoolUtils.detectOverloadVoid(org.commonjava.indy.core.ctl.PoolUtils.detectOverloadVoid) Plugin(org.apache.maven.artifact.repository.metadata.Plugin) ByteArrayOutputStream(java.io.ByteArrayOutputStream) MetadataXpp3Writer(org.apache.maven.artifact.repository.metadata.io.xpp3.MetadataXpp3Writer) Locker(org.commonjava.cdi.util.weft.Locker) MavenMetadataProvider(org.commonjava.indy.pkg.maven.content.group.MavenMetadataProvider) HashMap(java.util.HashMap) Callable(java.util.concurrent.Callable) AtomicReference(java.util.concurrent.atomic.AtomicReference) VersionUtils(org.commonjava.atlas.maven.ident.util.VersionUtils) Group(org.commonjava.indy.model.core.Group) ArrayList(java.util.ArrayList) Inject(javax.inject.Inject) HashSet(java.util.HashSet) SnapshotVersion(org.apache.maven.artifact.repository.metadata.SnapshotVersion) Transfer(org.commonjava.maven.galley.model.Transfer) Measure(org.commonjava.o11yphant.metrics.annotation.Measure) ExecutorConfig(org.commonjava.cdi.util.weft.ExecutorConfig) IndyWorkflowException(org.commonjava.indy.IndyWorkflowException) TypeAndClassifier(org.commonjava.atlas.maven.ident.ref.TypeAndClassifier) GalleyMavenXMLException(org.commonjava.maven.galley.maven.parse.GalleyMavenXMLException) PathUtils.parentPath(org.commonjava.maven.galley.util.PathUtils.parentPath) DrainingExecutorCompletionService(org.commonjava.cdi.util.weft.DrainingExecutorCompletionService) SnapshotPart(org.commonjava.atlas.maven.ident.version.part.SnapshotPart) MetadataXpp3Reader(org.apache.maven.artifact.repository.metadata.io.xpp3.MetadataXpp3Reader) OutputStream(java.io.OutputStream) Versioning(org.apache.maven.artifact.repository.metadata.Versioning) LocationUtils(org.commonjava.indy.util.LocationUtils) ArtifactStore(org.commonjava.indy.model.core.ArtifactStore) UTF_8(java.nio.charset.StandardCharsets.UTF_8) TraceManager(org.commonjava.o11yphant.trace.TraceManager) IOUtils.closeQuietly(org.apache.commons.io.IOUtils.closeQuietly) IOException(java.io.IOException) SnapshotUtils.generateUpdateTimestamp(org.commonjava.atlas.maven.ident.util.SnapshotUtils.generateUpdateTimestamp) SimpleTypeAndClassifier(org.commonjava.atlas.maven.ident.ref.SimpleTypeAndClassifier) SnapshotUtils(org.commonjava.atlas.maven.ident.util.SnapshotUtils) NotFoundCache(org.commonjava.maven.galley.spi.nfc.NotFoundCache) File(java.io.File) ExecutionException(java.util.concurrent.ExecutionException) Element(org.w3c.dom.Element) StringReader(java.io.StringReader) Paths(java.nio.file.Paths) TypeMapper(org.commonjava.maven.galley.maven.spi.type.TypeMapper) StoreResource(org.commonjava.indy.content.StoreResource) SnapshotUtils.getCurrentTimestamp(org.commonjava.atlas.maven.ident.util.SnapshotUtils.getCurrentTimestamp) TypeMapping(org.commonjava.maven.galley.model.TypeMapping) SingleVersion(org.commonjava.atlas.maven.ident.version.SingleVersion) AbstractMergedContentGenerator(org.commonjava.indy.core.content.AbstractMergedContentGenerator) Collections(java.util.Collections) StoreDataManager(org.commonjava.indy.data.StoreDataManager) InputStream(java.io.InputStream) IndyWorkflowException(org.commonjava.indy.IndyWorkflowException) EventMetadata(org.commonjava.maven.galley.event.EventMetadata) Metadata(org.apache.maven.artifact.repository.metadata.Metadata) ExecutionException(java.util.concurrent.ExecutionException) DrainingExecutorCompletionService(org.commonjava.cdi.util.weft.DrainingExecutorCompletionService)

Example 20 with Group

use of org.commonjava.indy.model.core.Group in project indy by Commonjava.

the class GroupMetaOverlapWithMetaOfHostedReposTest method run.

@Test
@Category(EventDependent.class)
public void run() throws Exception {
    final String repo1 = "repo1";
    final String repo2 = "repo2";
    final String path = "org/foo/bar/maven-metadata.xml";
    /* @formatter:off */
    final String repo1Content = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" + "<metadata>\n" + "  <groupId>org.foo</groupId>\n" + "  <artifactId>bar</artifactId>\n" + "  <versioning>\n" + "    <latest>1.0</latest>\n" + "    <release>1.0</release>\n" + "    <versions>\n" + "      <version>1.0</version>\n" + "    </versions>\n" + "    <lastUpdated>20150722164334</lastUpdated>\n" + "  </versioning>\n" + "</metadata>\n";
    /* @formatter:on */
    /* @formatter:off */
    final String repo2Content = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" + "<metadata>\n" + "  <groupId>org.foo</groupId>\n" + "  <artifactId>bar</artifactId>\n" + "  <versioning>\n" + "    <latest>1.1</latest>\n" + "    <release>1.1</release>\n" + "    <versions>\n" + "      <version>1.1</version>\n" + "    </versions>\n" + "    <lastUpdated>20150822164334</lastUpdated>\n" + "  </versioning>\n" + "</metadata>\n";
    /* @formatter:on */
    server.expect(server.formatUrl(repo1, path), 200, repo1Content);
    server.expect(server.formatUrl(repo2, path), 200, repo2Content);
    RemoteRepository remote1 = new RemoteRepository(repo1, server.formatUrl(repo1));
    remote1 = client.stores().create(remote1, "adding remote", RemoteRepository.class);
    RemoteRepository remote2 = new RemoteRepository(repo2, server.formatUrl(repo2));
    remote2 = client.stores().create(remote2, "adding remote", RemoteRepository.class);
    Group g = new Group("test", remote1.getKey(), remote2.getKey());
    g = client.stores().create(g, "adding group", Group.class);
    System.out.printf("\n\nGroup constituents are:\n  %s\n\n", StringUtils.join(g.getConstituents(), "\n  "));
    InputStream stream = client.content().get(group, g.getName(), path);
    assertThat(stream, notNullValue());
    String metadata = IOUtils.toString(stream);
    /* @formatter:off */
    final String groupContent = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" + "<metadata>\n" + "  <groupId>org.foo</groupId>\n" + "  <artifactId>bar</artifactId>\n" + "  <versioning>\n" + "    <latest>1.1</latest>\n" + "    <release>1.1</release>\n" + "    <versions>\n" + "      <version>1.0</version>\n" + "      <version>1.1</version>\n" + "    </versions>\n" + "    <lastUpdated>20150822164334</lastUpdated>\n" + "  </versioning>\n" + "</metadata>\n";
    /* @formatter:on */
    assertThat(metadata, equalTo(groupContent));
    final String hostedRepo = "hostedRepo";
    HostedRepository hostedRepository = new HostedRepository(hostedRepo);
    hostedRepository = client.stores().create(hostedRepository, "adding hosted", HostedRepository.class);
    /* @formatter:off */
    final String hostedMetaContent = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" + "<metadata>\n" + "  <groupId>org.foo</groupId>\n" + "  <artifactId>bar</artifactId>\n" + "  <versioning>\n" + "    <latest>1.2</latest>\n" + "    <release>1.2</release>\n" + "    <versions>\n" + "      <version>1.2</version>\n" + "    </versions>\n" + "    <lastUpdated>20150922164334</lastUpdated>\n" + "  </versioning>\n" + "</metadata>\n";
    /* @formatter:on */
    client.content().store(hostedRepository.getKey(), path, new ByteArrayInputStream(hostedMetaContent.getBytes("UTF-8")));
    final PathInfo p = client.content().getInfo(hosted, hostedRepo, path);
    assertThat("hosted metadata should exist", p.exists(), equalTo(true));
    g.addConstituent(hostedRepository);
    client.stores().update(g, "add new hosted");
    System.out.printf("\n\nUpdated group constituents are:\n  %s\n\n", StringUtils.join(g.getConstituents(), "\n  "));
    waitForEventPropagation();
    final String gpLevelMetaFilePath = String.format("%s/var/lib/indy/storage/%s-%s/%s", fixture.getBootOptions().getHomeDir(), group.name(), g.getName(), path);
    assertThat("group metadata should be removed after merging", new File(gpLevelMetaFilePath).exists(), equalTo(false));
    stream = client.content().get(group, g.getName(), path);
    assertThat(stream, notNullValue());
    metadata = IOUtils.toString(stream);
    /* @formatter:off */
    final String updGroupContent = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" + "<metadata>\n" + "  <groupId>org.foo</groupId>\n" + "  <artifactId>bar</artifactId>\n" + "  <versioning>\n" + "    <latest>1.2</latest>\n" + "    <release>1.2</release>\n" + "    <versions>\n" + "      <version>1.0</version>\n" + "      <version>1.1</version>\n" + "      <version>1.2</version>\n" + "    </versions>\n" + "    <lastUpdated>20150922164334</lastUpdated>\n" + "  </versioning>\n" + "</metadata>\n";
    /* @formatter:on */
    assertThat(metadata, equalTo(updGroupContent));
}
Also used : Group(org.commonjava.indy.model.core.Group) ByteArrayInputStream(java.io.ByteArrayInputStream) ByteArrayInputStream(java.io.ByteArrayInputStream) InputStream(java.io.InputStream) RemoteRepository(org.commonjava.indy.model.core.RemoteRepository) PathInfo(org.commonjava.indy.client.core.helper.PathInfo) File(java.io.File) HostedRepository(org.commonjava.indy.model.core.HostedRepository) Category(org.junit.experimental.categories.Category) Test(org.junit.Test) AbstractContentManagementTest(org.commonjava.indy.ftest.core.AbstractContentManagementTest)

Aggregations

Group (org.commonjava.indy.model.core.Group)211 Test (org.junit.Test)111 HostedRepository (org.commonjava.indy.model.core.HostedRepository)89 RemoteRepository (org.commonjava.indy.model.core.RemoteRepository)82 StoreKey (org.commonjava.indy.model.core.StoreKey)76 ByteArrayInputStream (java.io.ByteArrayInputStream)67 InputStream (java.io.InputStream)62 IndyDataException (org.commonjava.indy.data.IndyDataException)44 AbstractContentManagementTest (org.commonjava.indy.ftest.core.AbstractContentManagementTest)42 ArtifactStore (org.commonjava.indy.model.core.ArtifactStore)42 Transfer (org.commonjava.maven.galley.model.Transfer)31 EventMetadata (org.commonjava.maven.galley.event.EventMetadata)30 Logger (org.slf4j.Logger)30 Before (org.junit.Before)29 StoreDataManager (org.commonjava.indy.data.StoreDataManager)27 ConcreteResource (org.commonjava.maven.galley.model.ConcreteResource)27 HashSet (java.util.HashSet)26 ArrayList (java.util.ArrayList)25 List (java.util.List)22 IndyWorkflowException (org.commonjava.indy.IndyWorkflowException)22