Search in sources :

Example 1 with GalleyInfrastructure

use of org.commonjava.maven.ext.io.resolver.GalleyInfrastructure in project pom-manipulation-ext by release-engineering.

the class FileIOTest method before.

@Before
public void before() throws Exception {
    File res = folder.newFolder();
    GalleyInfrastructure galleyInfra = new GalleyInfrastructure(null, null, null, null, null, null, null, null, res);
    FieldUtils.writeField(fileIO, "infra", galleyInfra, true);
}
Also used : GalleyInfrastructure(org.commonjava.maven.ext.io.resolver.GalleyInfrastructure) File(java.io.File) Before(org.junit.Before)

Example 2 with GalleyInfrastructure

use of org.commonjava.maven.ext.io.resolver.GalleyInfrastructure in project pom-manipulation-ext by release-engineering.

the class ModelResolverTest method resolveArtifactTest.

@Test(expected = ManipulationException.class)
@BMRule(name = "retrieve-first-null", targetClass = "ArtifactManagerImpl", targetMethod = "retrieveFirst(List<? extends Location> locations, ArtifactRef ref)", targetLocation = "AT ENTRY", action = "RETURN null")
public void resolveArtifactTest() throws Exception {
    final ManipulationSession session = new ManipulationSession();
    final GalleyInfrastructure galleyInfra = new GalleyInfrastructure(session.getTargetDir(), session.getRemoteRepositories(), session.getLocalRepository(), session.getSettings(), session.getActiveProfiles(), null, null, null, temp.newFolder("cache-dir"));
    final GalleyAPIWrapper wrapper = new GalleyAPIWrapper(galleyInfra);
    final ModelIO model = new ModelIO();
    FieldUtils.writeField(model, "galleyWrapper", wrapper, true);
    model.resolveRawModel(SimpleProjectVersionRef.parse("org.commonjava:commonjava:5"));
}
Also used : GalleyInfrastructure(org.commonjava.maven.ext.io.resolver.GalleyInfrastructure) ModelIO(org.commonjava.maven.ext.io.ModelIO) ManipulationSession(org.commonjava.maven.ext.core.ManipulationSession) GalleyAPIWrapper(org.commonjava.maven.ext.io.resolver.GalleyAPIWrapper) BMRule(org.jboss.byteman.contrib.bmunit.BMRule) Test(org.junit.Test)

Example 3 with GalleyInfrastructure

use of org.commonjava.maven.ext.io.resolver.GalleyInfrastructure in project pom-manipulation-ext by release-engineering.

the class DistributionEnforcingManipulatorTest method before.

@Before
public void before() throws Exception {
    userCliProperties = new Properties();
    session = new ManipulationSession();
    final GalleyInfrastructure galleyInfra = new GalleyInfrastructure(session.getTargetDir(), session.getRemoteRepositories(), session.getLocalRepository(), session.getSettings(), session.getActiveProfiles(), null, null, null, temp.newFolder("cache-dir"));
    final GalleyAPIWrapper wrapper = new GalleyAPIWrapper(galleyInfra);
    manipulator = new DistributionEnforcingManipulator();
    FieldUtils.writeField(manipulator, "galleyWrapper", wrapper, true);
}
Also used : GalleyInfrastructure(org.commonjava.maven.ext.io.resolver.GalleyInfrastructure) ManipulationSession(org.commonjava.maven.ext.core.ManipulationSession) GalleyAPIWrapper(org.commonjava.maven.ext.io.resolver.GalleyAPIWrapper) Properties(java.util.Properties) Before(org.junit.Before)

Aggregations

GalleyInfrastructure (org.commonjava.maven.ext.io.resolver.GalleyInfrastructure)3 ManipulationSession (org.commonjava.maven.ext.core.ManipulationSession)2 GalleyAPIWrapper (org.commonjava.maven.ext.io.resolver.GalleyAPIWrapper)2 Before (org.junit.Before)2 File (java.io.File)1 Properties (java.util.Properties)1 ModelIO (org.commonjava.maven.ext.io.ModelIO)1 BMRule (org.jboss.byteman.contrib.bmunit.BMRule)1 Test (org.junit.Test)1