Class RemoteRepository.Policy
java.lang.Object
org.apache.maven.resolver.internal.ant.types.RemoteRepository.Policy
- Enclosing class:
RemoteRepository
Represents a repository policy configuration for either snapshot or release handling.
Includes controls for enabling/disabling access, checksum verification, and update frequency.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the checksum policy string.Gets the update policy string.booleanIndicates whether the policy is enabled.voidsetChecksums(String checksumPolicy) Sets the checksum policy for this policy.voidsetEnabled(boolean enabled) Enables or disables the policy.voidsetUpdates(String updatePolicy) Sets the update policy for this policy.
-
Constructor Details
-
Policy
public Policy()Constructs a newPolicyinstance 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:
trueif enabled,falseotherwise
-
setEnabled
public void setEnabled(boolean enabled) Enables or disables the policy.- Parameters:
enabled- whether to enable the policy
-
getChecksums
Gets the checksum policy string.- Returns:
- the checksum policy (e.g.,
warn,fail)
-
setChecksums
Sets the checksum policy for this policy.- Parameters:
checksumPolicy- the checksum policy- Throws:
org.apache.tools.ant.BuildException- if the policy is invalid
-
getUpdates
Gets the update policy string.- Returns:
- the update policy (e.g.,
daily,never)
-
setUpdates
Sets the update policy for this policy.- Parameters:
updatePolicy- the update policy- Throws:
org.apache.tools.ant.BuildException- if the policy is invalid
-