001/* 002 * Licensed to the Apache Software Foundation (ASF) under one 003 * or more contributor license agreements. See the NOTICE file 004 * distributed with this work for additional information 005 * regarding copyright ownership. The ASF licenses this file 006 * to you under the Apache License, Version 2.0 (the 007 * "License"); you may not use this file except in compliance 008 * with the License. You may obtain a copy of the License at 009 * 010 * http://www.apache.org/licenses/LICENSE-2.0 011 * 012 * Unless required by applicable law or agreed to in writing, 013 * software distributed under the License is distributed on an 014 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 015 * KIND, either express or implied. See the License for the 016 * specific language governing permissions and limitations 017 * under the License. 018 */ 019package org.eclipse.aether.connector.basic; 020 021import org.eclipse.aether.ConfigurationProperties; 022import org.eclipse.aether.RepositorySystemSession; 023 024/** 025 * The configuration keys for {@link BasicRepositoryConnector}. 026 * 027 * @since 2.0.0 028 */ 029public final class BasicRepositoryConnectorConfigurationKeys { 030 private BasicRepositoryConnectorConfigurationKeys() {} 031 032 /** 033 * The prefix for configuration properties. 034 */ 035 public static final String CONFIG_PROPS_PREFIX = 036 ConfigurationProperties.PREFIX_CONNECTOR + BasicRepositoryConnectorFactory.NAME + "."; 037 038 /** 039 * Flag indicating whether checksums which are retrieved during checksum validation should be persisted in the 040 * local repository next to the file they provide the checksum for. 041 * 042 * @since 0.9.0.M4 043 * @configurationSource {@link RepositorySystemSession#getConfigProperties()} 044 * @configurationType {@link java.lang.Boolean} 045 * @configurationDefaultValue {@link #DEFAULT_PERSISTED_CHECKSUMS} 046 * @configurationRepoIdSuffix No 047 */ 048 public static final String CONFIG_PROP_PERSISTED_CHECKSUMS = CONFIG_PROPS_PREFIX + "persistedChecksums"; 049 050 public static final boolean DEFAULT_PERSISTED_CHECKSUMS = true; 051 052 /** 053 * Number of threads in basic connector for uploading/downloading. Observed only if some of the 054 * upstream or downstream threads are not set. (Deprecated) 055 * 056 * @since 0.9.0.M4 057 * @configurationSource {@link RepositorySystemSession#getConfigProperties()} 058 * @configurationType {@link java.lang.Integer} 059 * @configurationDefaultValue {@link #DEFAULT_THREADS} 060 * @configurationRepoIdSuffix No 061 * @deprecated Use {@link #CONFIG_PROP_UPSTREAM_THREADS} and {@link #CONFIG_PROP_DOWNSTREAM_THREADS} instead. 062 */ 063 @Deprecated 064 public static final String CONFIG_PROP_THREADS = CONFIG_PROPS_PREFIX + "threads"; 065 066 /** 067 * Number of threads in basic connector for uploading. 068 * 069 * @since 2.0.0 070 * @configurationSource {@link RepositorySystemSession#getConfigProperties()} 071 * @configurationType {@link java.lang.Integer} 072 * @configurationDefaultValue {@link #DEFAULT_THREADS} 073 * @configurationRepoIdSuffix Yes 074 */ 075 public static final String CONFIG_PROP_UPSTREAM_THREADS = CONFIG_PROPS_PREFIX + "upstreamThreads"; 076 077 /** 078 * Number of threads in basic connector for downloading. 079 * 080 * @since 2.0.0 081 * @configurationSource {@link RepositorySystemSession#getConfigProperties()} 082 * @configurationType {@link java.lang.Integer} 083 * @configurationDefaultValue {@link #DEFAULT_THREADS} 084 * @configurationRepoIdSuffix Yes 085 */ 086 public static final String CONFIG_PROP_DOWNSTREAM_THREADS = CONFIG_PROPS_PREFIX + "downstreamThreads"; 087 088 public static final int DEFAULT_THREADS = 5; 089 090 /** 091 * Enables or disables parallel PUT processing (parallel deploys) on basic connector globally or per remote 092 * repository. When disabled, connector behaves exactly as in Maven 3.8.x did: GETs are parallel while PUTs 093 * are sequential. 094 * 095 * @since 1.9.5 096 * @configurationSource {@link RepositorySystemSession#getConfigProperties()} 097 * @configurationType {@link java.lang.Boolean} 098 * @configurationDefaultValue {@link #DEFAULT_PARALLEL_PUT} 099 * @configurationRepoIdSuffix Yes 100 */ 101 public static final String CONFIG_PROP_PARALLEL_PUT = CONFIG_PROPS_PREFIX + "parallelPut"; 102 103 public static final boolean DEFAULT_PARALLEL_PUT = true; 104 105 /** 106 * Flag indicating that instead of comparing the external checksum fetched from the remote repo with the 107 * calculated one, it should try to extract the reference checksum from the actual artifact response headers 108 * This only works for HTTP transports. 109 * 110 * @since 0.9.0.M3 111 * @configurationSource {@link RepositorySystemSession#getConfigProperties()} 112 * @configurationType {@link java.lang.Boolean} 113 * @configurationDefaultValue {@link #DEFAULT_SMART_CHECKSUMS} 114 * @configurationRepoIdSuffix No 115 */ 116 public static final String CONFIG_PROP_SMART_CHECKSUMS = CONFIG_PROPS_PREFIX + "smartChecksums"; 117 118 public static final boolean DEFAULT_SMART_CHECKSUMS = true; 119}