Skip to content

Commit

Permalink
Update galley to 1.18-SNAPSHOT
Browse files Browse the repository at this point in the history
  • Loading branch information
yma96 committed Feb 8, 2025
1 parent 1eb3d70 commit cccf489
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import org.commonjava.maven.galley.model.Location;
import org.commonjava.maven.galley.model.Transfer;
import org.commonjava.maven.galley.model.TransferOperation;
import org.commonjava.maven.galley.proxy.NoOpProxySitesCache;
import org.commonjava.maven.galley.transport.htcli.internal.HttpDownload;
import org.commonjava.maven.galley.transport.htcli.model.SimpleHttpLocation;
import org.commonjava.o11yphant.metrics.DefaultMetricRegistry;
Expand Down Expand Up @@ -154,7 +155,7 @@ private Transfer getTestHttpTransfer(final String path, final String content) th
assertThat( transfer.exists(), equalTo( false ) );

HttpDownload dl = new HttpDownload( url, location, transfer, new HashMap<>(), new EventMetadata(),
fixture.getHttp().getHttp(), new ObjectMapper(), true, metricRegistry, metricConfig );
fixture.getHttp().getHttp(), new ObjectMapper(), true, metricRegistry, metricConfig, new NoOpProxySitesCache() );

return dl.call().getTransfer();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@
import org.commonjava.indy.subsys.cassandra.CassandraClient;
import org.commonjava.indy.subsys.infinispan.BasicCacheHandle;
import org.commonjava.indy.subsys.infinispan.CacheProducer;
import org.commonjava.maven.galley.proxy.NoOpProxySitesCache;
import org.commonjava.maven.galley.spi.nfc.NotFoundCache;
import org.commonjava.maven.galley.spi.proxy.ProxySitesCache;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down Expand Up @@ -61,6 +63,8 @@ public class CoreProvider

private IndyObjectMapper objectMapper;

private ProxySitesCache proxySitesCache;

public CoreProvider()
{
}
Expand All @@ -69,6 +73,7 @@ public CoreProvider()
public void init()
{
this.objectMapper = new IndyObjectMapper( objectMapperModules, objectMapperModuleSets );
this.proxySitesCache = new NoOpProxySitesCache();

String nfcProvider = indyConfiguration.getNfcProvider();
logger.info( "Apply nfc provider: {}", nfcProvider );
Expand Down Expand Up @@ -98,4 +103,10 @@ public IndyObjectMapper getIndyObjectMapper()
@Default
public NotFoundCache getNotFoundCache() { return notFoundCache; }

// @Produces
// @Default
// public ProxySitesCache getProxySitesCache()
// {
// return proxySitesCache;
// }
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,12 @@
import org.commonjava.maven.galley.io.SpecialPathManagerImpl;
import org.commonjava.maven.galley.io.TransferDecoratorManager;
import org.commonjava.maven.galley.nfc.MemoryNotFoundCache;
import org.commonjava.maven.galley.proxy.NoOpProxySitesCache;
import org.commonjava.maven.galley.spi.cache.CacheProvider;
import org.commonjava.maven.galley.spi.event.FileEventManager;
import org.commonjava.maven.galley.spi.io.SpecialPathManager;
import org.commonjava.maven.galley.spi.nfc.NotFoundCache;
import org.commonjava.maven.galley.spi.proxy.ProxySitesCache;
import org.commonjava.maven.galley.spi.transport.TransportManager;
import org.commonjava.maven.galley.transport.TransportManagerImpl;
import org.commonjava.maven.galley.transport.htcli.HttpClientTransport;
Expand All @@ -60,6 +62,8 @@ public class GalleyFixture

private final NotFoundCache nfc;

private final ProxySitesCache proxySitesCache;

private final SpecialPathManager specialPathManager;

private final ExecutorService batchExecutor;
Expand All @@ -74,6 +78,7 @@ public GalleyFixture( final File repoRoot )
executor = Executors.newFixedThreadPool( 2 );
batchExecutor = Executors.newFixedThreadPool( 2 );
nfc = new MemoryNotFoundCache();
proxySitesCache = new NoOpProxySitesCache();
specialPathManager = new SpecialPathManagerImpl();

TransportManagerConfig transportManagerConfig = new TransportManagerConfig();
Expand Down Expand Up @@ -121,4 +126,8 @@ public NotFoundCache getNotFoundCache()
return nfc;
}

public ProxySitesCache getProxySitesCache()
{
return proxySitesCache;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
import org.commonjava.maven.galley.config.TransportManagerConfig;
import org.commonjava.maven.galley.maven.spi.defaults.MavenPluginDefaults;
import org.commonjava.maven.galley.maven.spi.defaults.MavenPluginImplications;
import org.commonjava.maven.galley.proxy.NoOpProxySitesCache;
import org.commonjava.maven.galley.spi.proxy.ProxySitesCache;
import org.commonjava.maven.galley.transport.htcli.conf.GlobalHttpConfiguration;
import org.commonjava.o11yphant.metrics.TrafficClassifier;
import org.commonjava.o11yphant.metrics.sli.GoldenSignalsMetricSet;
Expand Down Expand Up @@ -113,4 +115,10 @@ public StoreDataManager getStoreDataManager()
{
return new MemoryStoreDataManager( true );
}

@Produces
public ProxySitesCache getProxySitesCache()
{
return new NoOpProxySitesCache();
}
}
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
<indyModelVersion>1.5</indyModelVersion>
<indyClientVersion>3.4.0</indyClientVersion>
<atlasVersion>1.1.4</atlasVersion>
<galleyVersion>1.17</galleyVersion>
<galleyVersion>1.18-SNAPSHOT</galleyVersion>
<weftVersion>1.24</weftVersion>
<webdavVersion>3.2.1</webdavVersion>
<!-- TODO: partyline is still needed for standalone mode, may be removed in future -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,11 @@
import org.commonjava.maven.galley.io.NoOpTransferDecorator;
import org.commonjava.maven.galley.io.TransferDecoratorManager;
import org.commonjava.maven.galley.nfc.MemoryNotFoundCache;
import org.commonjava.maven.galley.proxy.NoOpProxySitesCache;
import org.commonjava.maven.galley.spi.cache.CacheProvider;
import org.commonjava.maven.galley.spi.event.FileEventManager;
import org.commonjava.maven.galley.spi.nfc.NotFoundCache;
import org.commonjava.maven.galley.spi.proxy.ProxySitesCache;
import org.commonjava.maven.galley.transport.htcli.conf.GlobalHttpConfiguration;
import org.commonjava.maven.galley.transport.htcli.conf.GlobalProxyConfig;
import org.junit.rules.TemporaryFolder;
Expand Down Expand Up @@ -65,6 +67,8 @@ public class TestProvider

private NotFoundCache nfc;

private ProxySitesCache proxySitesCache;

private StoreDataManager storeDataManager;

private ObjectMapper objectMapper;
Expand Down Expand Up @@ -94,6 +98,7 @@ public void setup()
{
storeDataManager = new MemoryStoreDataManager( true );
nfc = new MemoryNotFoundCache();
proxySitesCache = new NoOpProxySitesCache();
objectMapper = new IndyObjectMapper( false );
fileEventManager = new NoOpFileEventManager();
transferDecorator = new NoOpTransferDecorator();
Expand Down Expand Up @@ -135,6 +140,12 @@ public NotFoundCache getNfc()
return nfc;
}

@Produces
public ProxySitesCache getProxySitesCache()
{
return proxySitesCache;
}

@Produces
@Standalone
@Default
Expand Down

0 comments on commit cccf489

Please sign in to comment.