Class RemoteRepository.Policy

java.lang.Object
org.apache.maven.resolver.internal.ant.types.RemoteRepository.Policy
Enclosing class:
RemoteRepository

public static class RemoteRepository.Policy extends Object
Represents a repository policy configuration for either snapshot or release handling. Includes controls for enabling/disabling access, checksum verification, and update frequency.
See Also:
  • RepositoryPolicy
  • Constructor Details

    • Policy

      public Policy()
      Constructs a new Policy instance with default settings. The policy is enabled by default, with no specific checksum or update policies set.
  • Method Details

    • isEnabled

      public boolean isEnabled()
      Indicates whether the policy is enabled.
      Returns:
      true if enabled, false otherwise
    • setEnabled

      public void setEnabled(boolean enabled)
      Enables or disables the policy.
      Parameters:
      enabled - whether to enable the policy
    • getChecksums

      public String getChecksums()
      Gets the checksum policy string.
      Returns:
      the checksum policy (e.g., warn, fail)
    • setChecksums

      public void setChecksums(String checksumPolicy)
      Sets the checksum policy for this policy.
      Parameters:
      checksumPolicy - the checksum policy
      Throws:
      org.apache.tools.ant.BuildException - if the policy is invalid
    • getUpdates

      public String getUpdates()
      Gets the update policy string.
      Returns:
      the update policy (e.g., daily, never)
    • setUpdates

      public void setUpdates(String updatePolicy)
      Sets the update policy for this policy.
      Parameters:
      updatePolicy - the update policy
      Throws:
      org.apache.tools.ant.BuildException - if the policy is invalid