Java Code Examples for org.eclipse.aether.repository.RepositoryPolicy#CHECKSUM_POLICY_WARN

The following examples show how to use org.eclipse.aether.repository.RepositoryPolicy#CHECKSUM_POLICY_WARN . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AetherUtils.java    From takari-lifecycle with Eclipse Public License 1.0 6 votes vote down vote up
public static RepositoryPolicy toRepositoryPolicy(org.apache.maven.model.RepositoryPolicy policy) {
  boolean enabled = true;
  String checksums = RepositoryPolicy.CHECKSUM_POLICY_WARN;
  String updates = RepositoryPolicy.UPDATE_POLICY_DAILY;

  if (policy != null) {
    enabled = policy.isEnabled();
    if (policy.getUpdatePolicy() != null) {
      updates = policy.getUpdatePolicy();
    }
    if (policy.getChecksumPolicy() != null) {
      checksums = policy.getChecksumPolicy();
    }
  }

  return new RepositoryPolicy(enabled, updates, checksums);
}
 
Example 2
Source File: BootstrapMavenContext.java    From quarkus with Apache License 2.0 5 votes vote down vote up
private static RepositoryPolicy toAetherRepoPolicy(org.apache.maven.model.RepositoryPolicy modelPolicy) {
    return new RepositoryPolicy(modelPolicy.isEnabled(),
            StringUtils.isEmpty(modelPolicy.getUpdatePolicy()) ? RepositoryPolicy.UPDATE_POLICY_DAILY
                    : modelPolicy.getUpdatePolicy(),
            StringUtils.isEmpty(modelPolicy.getChecksumPolicy()) ? RepositoryPolicy.CHECKSUM_POLICY_WARN
                    : modelPolicy.getChecksumPolicy());
}