use of org.apache.maven.artifact.repository.ArtifactRepositoryPolicy in project maven-archetype by apache.
the class DefaultArchetypeGenerator method createRepository.
private ArtifactRepository createRepository(String url, String repositoryId) {
// snapshots vs releases
// offline = to turning the update policy off
// TODO: we'll need to allow finer grained creation of repositories but this will do for now
String updatePolicyFlag = ArtifactRepositoryPolicy.UPDATE_POLICY_ALWAYS;
String checksumPolicyFlag = ArtifactRepositoryPolicy.CHECKSUM_POLICY_WARN;
ArtifactRepositoryPolicy snapshotsPolicy = new ArtifactRepositoryPolicy(true, updatePolicyFlag, checksumPolicyFlag);
ArtifactRepositoryPolicy releasesPolicy = new ArtifactRepositoryPolicy(true, updatePolicyFlag, checksumPolicyFlag);
return new MavenArtifactRepository(repositoryId, url, defaultArtifactRepositoryLayout, snapshotsPolicy, releasesPolicy);
}
use of org.apache.maven.artifact.repository.ArtifactRepositoryPolicy in project maven-archetype by apache.
the class ArchetypeGenerationTest method createRepository.
private ArtifactRepository createRepository(String url, String repositoryId) {
String updatePolicyFlag = ArtifactRepositoryPolicy.UPDATE_POLICY_ALWAYS;
String checksumPolicyFlag = ArtifactRepositoryPolicy.CHECKSUM_POLICY_WARN;
ArtifactRepositoryPolicy snapshotsPolicy = new ArtifactRepositoryPolicy(true, updatePolicyFlag, checksumPolicyFlag);
ArtifactRepositoryPolicy releasesPolicy = new ArtifactRepositoryPolicy(true, updatePolicyFlag, checksumPolicyFlag);
return new MavenArtifactRepository(repositoryId, url, new DefaultRepositoryLayout(), snapshotsPolicy, releasesPolicy);
}
use of org.apache.maven.artifact.repository.ArtifactRepositoryPolicy in project maven-archetype by apache.
the class RoundtripMultiModuleIT method createRepository.
private ArtifactRepository createRepository(String url, String repositoryId) {
String updatePolicyFlag = ArtifactRepositoryPolicy.UPDATE_POLICY_ALWAYS;
String checksumPolicyFlag = ArtifactRepositoryPolicy.CHECKSUM_POLICY_WARN;
ArtifactRepositoryPolicy snapshotsPolicy = new ArtifactRepositoryPolicy(true, updatePolicyFlag, checksumPolicyFlag);
ArtifactRepositoryPolicy releasesPolicy = new ArtifactRepositoryPolicy(true, updatePolicyFlag, checksumPolicyFlag);
return new MavenArtifactRepository(repositoryId, url, new DefaultRepositoryLayout(), snapshotsPolicy, releasesPolicy);
}
Aggregations