1 /* 2 * Licensed to the Apache Software Foundation (ASF) under one 3 * or more contributor license agreements. See the NOTICE file 4 * distributed with this work for additional information 5 * regarding copyright ownership. The ASF licenses this file 6 * to you under the Apache License, Version 2.0 (the 7 * "License"); you may not use this file except in compliance 8 * with the License. You may obtain a copy of the License at 9 * 10 * http://www.apache.org/licenses/LICENSE-2.0 11 * 12 * Unless required by applicable law or agreed to in writing, 13 * software distributed under the License is distributed on an 14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 * KIND, either express or implied. See the License for the 16 * specific language governing permissions and limitations 17 * under the License. 18 */ 19 package org.eclipse.aether.connector.basic; 20 21 import org.eclipse.aether.ConfigurationProperties; 22 import org.eclipse.aether.RepositorySystemSession; 23 24 /** 25 * The configuration keys for {@link BasicRepositoryConnector}. 26 * 27 * @since 2.0.0 28 */ 29 public final class BasicRepositoryConnectorConfigurationKeys { 30 private BasicRepositoryConnectorConfigurationKeys() {} 31 32 /** 33 * The prefix for configuration properties. 34 */ 35 public static final String CONFIG_PROPS_PREFIX = 36 ConfigurationProperties.PREFIX_CONNECTOR + BasicRepositoryConnectorFactory.NAME + "."; 37 38 /** 39 * Flag indicating whether checksums which are retrieved during checksum validation should be persisted in the 40 * local repository next to the file they provide the checksum for. 41 * 42 * @since 0.9.0.M4 43 * @configurationSource {@link RepositorySystemSession#getConfigProperties()} 44 * @configurationType {@link java.lang.Boolean} 45 * @configurationDefaultValue {@link #DEFAULT_PERSISTED_CHECKSUMS} 46 * @configurationRepoIdSuffix No 47 */ 48 public static final String CONFIG_PROP_PERSISTED_CHECKSUMS = CONFIG_PROPS_PREFIX + "persistedChecksums"; 49 50 public static final boolean DEFAULT_PERSISTED_CHECKSUMS = true; 51 52 /** 53 * Flag indicating whether checksums which are retrieved during checksum validation should be persisted in the 54 * local repository next to the file they provide the checksum for. 55 * 56 * @since 0.9.0.M4 57 * @configurationSource {@link RepositorySystemSession#getConfigProperties()} 58 * @configurationType {@link java.lang.Integer} 59 * @configurationDefaultValue {@link #DEFAULT_THREADS} 60 * @configurationRepoIdSuffix No 61 */ 62 public static final String CONFIG_PROP_THREADS = CONFIG_PROPS_PREFIX + "threads"; 63 64 public static final int DEFAULT_THREADS = 5; 65 66 /** 67 * Enables or disables parallel PUT processing (parallel deploys) on basic connector globally or per remote 68 * repository. When disabled, connector behaves exactly as in Maven 3.8.x did: GETs are parallel while PUTs 69 * are sequential. 70 * 71 * @since 1.9.5 72 * @configurationSource {@link RepositorySystemSession#getConfigProperties()} 73 * @configurationType {@link java.lang.Boolean} 74 * @configurationDefaultValue {@link #DEFAULT_PARALLEL_PUT} 75 * @configurationRepoIdSuffix Yes 76 */ 77 public static final String CONFIG_PROP_PARALLEL_PUT = CONFIG_PROPS_PREFIX + "parallelPut"; 78 79 public static final boolean DEFAULT_PARALLEL_PUT = true; 80 81 /** 82 * Flag indicating that instead of comparing the external checksum fetched from the remote repo with the 83 * calculated one, it should try to extract the reference checksum from the actual artifact response headers 84 * This only works for HTTP transports. 85 * 86 * @since 0.9.0.M3 87 * @configurationSource {@link RepositorySystemSession#getConfigProperties()} 88 * @configurationType {@link java.lang.Boolean} 89 * @configurationDefaultValue {@link #DEFAULT_SMART_CHECKSUMS} 90 * @configurationRepoIdSuffix No 91 */ 92 public static final String CONFIG_PROP_SMART_CHECKSUMS = CONFIG_PROPS_PREFIX + "smartChecksums"; 93 94 public static final boolean DEFAULT_SMART_CHECKSUMS = true; 95 }