Search in sources :

Example 26 with MavenArtifactRepository

use of org.apache.maven.artifact.repository.MavenArtifactRepository 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);
}
Also used : ArtifactRepositoryPolicy(org.apache.maven.artifact.repository.ArtifactRepositoryPolicy) DefaultRepositoryLayout(org.apache.maven.artifact.repository.layout.DefaultRepositoryLayout) MavenArtifactRepository(org.apache.maven.artifact.repository.MavenArtifactRepository)

Aggregations

MavenArtifactRepository (org.apache.maven.artifact.repository.MavenArtifactRepository)26 ArtifactRepositoryPolicy (org.apache.maven.artifact.repository.ArtifactRepositoryPolicy)18 DefaultRepositoryLayout (org.apache.maven.artifact.repository.layout.DefaultRepositoryLayout)17 ArtifactRepository (org.apache.maven.artifact.repository.ArtifactRepository)14 File (java.io.File)6 ArtifactRepositoryLayout (org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout)6 MavenSession (org.apache.maven.execution.MavenSession)4 Settings (org.apache.maven.settings.Settings)4 Location (org.commonjava.maven.galley.model.Location)3 ArrayList (java.util.ArrayList)2 Matcher (java.util.regex.Matcher)2 Artifact (org.apache.maven.artifact.Artifact)2 ArtifactFactory (org.apache.maven.artifact.factory.ArtifactFactory)2 DefaultMavenExecutionRequest (org.apache.maven.execution.DefaultMavenExecutionRequest)2 DefaultMavenExecutionResult (org.apache.maven.execution.DefaultMavenExecutionResult)2 MavenExecutionRequest (org.apache.maven.execution.MavenExecutionRequest)2 MojoFailureException (org.apache.maven.plugin.MojoFailureException)2 DefaultMirrorSelector (org.apache.maven.repository.DefaultMirrorSelector)2 Mirror (org.apache.maven.settings.Mirror)2 Profile (org.apache.maven.settings.Profile)2