LocalSnapshotMetadataGenerator( RepositorySystemSession session, InstallRequest request ) { legacyFormat = ConfigUtils.getBoolean( session.getConfigProperties(), false, "maven.metadata.legacy" ); snapshots = new LinkedHashMap<>(); }
RemoteSnapshotMetadataGenerator( RepositorySystemSession session, DeployRequest request ) { legacyFormat = ConfigUtils.getBoolean( session.getConfigProperties(), false, "maven.metadata.legacy" ); snapshots = new LinkedHashMap<>(); /* * NOTE: This should be considered a quirk to support interop with Maven's legacy ArtifactDeployer which * processes one artifact at a time and hence cannot associate the artifacts from the same project to use the * same timestamp+buildno for the snapshot versions. Allowing the caller to pass in metadata from a previous * deployment allows to re-establish the association between the artifacts of the same project. */ for ( Metadata metadata : request.getMetadata() ) { if ( metadata instanceof RemoteSnapshotMetadata ) { RemoteSnapshotMetadata snapshotMetadata = (RemoteSnapshotMetadata) metadata; snapshots.put( snapshotMetadata.getKey(), snapshotMetadata ); } } }
public ArtifactDescriptorResult readArtifactDescriptor( RepositorySystemSession session, ArtifactDescriptorRequest request ) throws ArtifactDescriptorException { ArtifactDescriptorResult result = new ArtifactDescriptorResult( request ); Model model = loadPom( session, request, result ); if ( model != null ) { Map<String, Object> config = session.getConfigProperties(); ArtifactDescriptorReaderDelegate delegate = (ArtifactDescriptorReaderDelegate) config.get( ArtifactDescriptorReaderDelegate.class.getName() ); if ( delegate == null ) { delegate = new ArtifactDescriptorReaderDelegate(); } delegate.populateResult( session, result, model ); } return result; }
&& session.getConfigProperties().get( DependencyManagerUtils.CONFIG_PROP_VERBOSE ) == null )
public PrioritizedComponents( RepositorySystemSession session ) { this( session.getConfigProperties() ); }
@Override public Map<String, Object> getConfigProperties() { return delegate.getConfigProperties(); }
PrioritizedComponents( RepositorySystemSession session ) { this( session.getConfigProperties() ); }
@Override public Map<String, Object> getConfigProperties() { return delegate.getConfigProperties(); }
@Override public Map<String, Object> getConfigProperties() { return delegate.getConfigProperties(); }
@Override public Map<String, Object> getConfigProperties() { return delegate.getConfigProperties(); }
@Override public Map<String, Object> getConfigProperties() { return getSession().getConfigProperties(); }
public LocalSnapshotMetadataGenerator( RepositorySystemSession session, InstallRequest request ) { legacyFormat = ConfigUtils.getBoolean( session.getConfigProperties(), false, "maven.metadata.legacy" ); snapshots = new LinkedHashMap<>(); }
LocalSnapshotMetadataGenerator( RepositorySystemSession session, InstallRequest request ) { legacyFormat = ConfigUtils.getBoolean( session.getConfigProperties(), false, "maven.metadata.legacy" ); snapshots = new LinkedHashMap<>(); }
public LocalSnapshotMetadataGenerator( RepositorySystemSession session, InstallRequest request ) { legacyFormat = ConfigUtils.getBoolean( session.getConfigProperties(), false, "maven.metadata.legacy" ); snapshots = new LinkedHashMap<Object, LocalSnapshotMetadata>(); }
public Map<String, Object> getConfigProperties() { return getSession().getConfigProperties(); }
/** * Gets the specified configuration property as a boolean flag. * * @param session The repository system session from which to read the configuration property, must not be * {@code null}. * @param defaultValue The default value to return in case none of the property keys is set to a boolean or string. * @param keys The property keys to read, must not be {@code null}. The specified keys are read one after one until * a {@link Boolean} or a string (to be {@link Boolean#parseBoolean(String) parsed as boolean}) is found. * @return The property value. */ public static boolean getBoolean( RepositorySystemSession session, boolean defaultValue, String... keys ) { return getBoolean( session.getConfigProperties(), defaultValue, keys ); }
/** * Gets the specified configuration property as map of key value pairs. * * @param session The repository system session from which to read the configuration property, must not be * {@code null}. * @param defaultValue The default value to return in case none of the property keys is set to a map. * @param keys The property keys to read, must not be {@code null}. The specified keys are read one after one until * a map is found. * @return The property value or {@code null} if none. */ public static Map<?, ?> getMap( RepositorySystemSession session, Map<?, ?> defaultValue, String... keys ) { return getMap( session.getConfigProperties(), defaultValue, keys ); }
/** * Gets the specified configuration property. * * @param session The repository system session from which to read the configuration property, must not be * {@code null}. * @param defaultValue The default value to return in case none of the property keys is set to a number. * @param keys The property keys to read, must not be {@code null}. The specified keys are read one after one until * a {@link Number} or a string representation of an {@link Integer} is found. * @return The property value. */ public static int getInteger( RepositorySystemSession session, int defaultValue, String... keys ) { return getInteger( session.getConfigProperties(), defaultValue, keys ); }
/** * Gets the specified configuration property as a single-precision floating point number. * * @param session The repository system session from which to read the configuration property, must not be * {@code null}. * @param defaultValue The default value to return in case none of the property keys is set to a number or numeric * string. * @param keys The property keys to read, must not be {@code null}. The specified keys are read one after one until * a {@link Number} or a string representation of a {@link Float} is found. * @return The property value. */ public static float getFloat( RepositorySystemSession session, float defaultValue, String... keys ) { return getFloat( session.getConfigProperties(), defaultValue, keys ); }
private void validateSession( RepositorySystemSession session ) { requireNonNull( session, "repository system session cannot be null" ); invalidSession( session.getLocalRepositoryManager(), "local repository manager" ); invalidSession( session.getSystemProperties(), "system properties" ); invalidSession( session.getUserProperties(), "user properties" ); invalidSession( session.getConfigProperties(), "config properties" ); invalidSession( session.getMirrorSelector(), "mirror selector" ); invalidSession( session.getProxySelector(), "proxy selector" ); invalidSession( session.getAuthenticationSelector(), "authentication selector" ); invalidSession( session.getArtifactTypeRegistry(), "artifact type registry" ); invalidSession( session.getData(), "data" ); }