org.apache.maven.artifact.repository.ArtifactRepositoryPolicy Java Examples
The following examples show how to use
org.apache.maven.artifact.repository.ArtifactRepositoryPolicy.
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: AbstractUnleashMojo.java From unleash-maven-plugin with Eclipse Public License 1.0 | 6 votes |
@MojoProduces @Named("additionalDeployemntRepositories") private Set<RemoteRepository> getAdditionalDeploymentRepositories() { Set<Repository> repos = new HashSet<>(); if (this.additionalDeploymentRepositories != null) { repos.addAll(this.additionalDeploymentRepositories); } System.getProperties().forEach((key, value) -> { if (key.toString().startsWith(PROPERTY_REPO_BASE)) { Repository.parseFromProperty(value.toString()).ifPresent(repo -> repos.add(repo)); } }); return repos.stream().map(repo -> { DefaultRepositoryLayout layout = new DefaultRepositoryLayout(); ArtifactRepositoryPolicy snapshotsPolicy = new ArtifactRepositoryPolicy(); ArtifactRepositoryPolicy releasesPolicy = new ArtifactRepositoryPolicy(); ArtifactRepository artifactRepository = new MavenArtifactRepository(repo.getId(), repo.getUrl(), layout, snapshotsPolicy, releasesPolicy); this.settings.getServers().stream().filter(server -> Objects.equals(server.getId(), repo.getId())).findFirst() .ifPresent(server -> artifactRepository.setAuthentication(createServerAuthentication(server))); return RepositoryUtils.toRepo(artifactRepository); }).collect(Collectors.toSet()); }
Example #2
Source File: MavenArtifactResolvingHelperTest.java From thorntail with Apache License 2.0 | 6 votes |
@Test // SWARM-1173: swarm-plugin trying to download SNAPSHOTs from Maven Central public void propagateRepositoryPolicies() { MavenArtifactResolvingHelper artifactResolverHelper = new MavenArtifactResolvingHelper(null, null, sessionMock, null); ArtifactRepositoryPolicy testSnapshotPolicy = new ArtifactRepositoryPolicy(false, "hourly", "warn"); ArtifactRepositoryPolicy testReleasesPolicy = new ArtifactRepositoryPolicy(true, "never", "warn"); ArtifactRepository testingRepo = new MavenArtifactRepository("testing-repo", "http://testing-repo.org", new DefaultRepositoryLayout(), testSnapshotPolicy, testReleasesPolicy); artifactResolverHelper.remoteRepository(testingRepo); List<RemoteRepository> remoteRepos = artifactResolverHelper.getRemoteRepositories(); Assert.assertTrue("Remote repositories " + remoteRepos + " do not contain expected testing repo " + testingRepo, remoteRepos.stream().anyMatch( remoteRepo -> { RepositoryPolicy snapshotsPolicy = remoteRepo.getPolicy(true); RepositoryPolicy releasesPolicy = remoteRepo.getPolicy(false); return remoteRepo.getId().equals(testingRepo.getId()) && !snapshotsPolicy.isEnabled() && snapshotsPolicy.getUpdatePolicy().equals(testSnapshotPolicy.getUpdatePolicy()) && snapshotsPolicy.getChecksumPolicy().equals(testSnapshotPolicy.getChecksumPolicy()) && releasesPolicy.isEnabled() && releasesPolicy.getUpdatePolicy().equals(testReleasesPolicy.getUpdatePolicy()) && releasesPolicy.getChecksumPolicy().equals(testReleasesPolicy.getChecksumPolicy()); }) ); }
Example #3
Source File: AbstractJnlpMojoTest.java From webstart with MIT License | 6 votes |
private void setUpProject( File pomFile, AbstractMojo mojo ) throws Exception { MavenProjectBuilder projectBuilder = (MavenProjectBuilder) lookup( MavenProjectBuilder.ROLE ); ArtifactRepositoryFactory artifactRepositoryFactory = (ArtifactRepositoryFactory) lookup( ArtifactRepositoryFactory.ROLE ); ArtifactRepositoryPolicy policy = new ArtifactRepositoryPolicy( true, "never", "never" ); String localRepoUrl = "file://" + System.getProperty( "user.home" ) + "/.m2/repository"; ArtifactRepository localRepository = artifactRepositoryFactory.createArtifactRepository( "local", localRepoUrl, new DefaultRepositoryLayout(), policy, policy ); ProfileManager profileManager = new DefaultProfileManager( getContainer() ); MavenProject project = projectBuilder.buildWithDependencies( pomFile, localRepository, profileManager ); //this gets the classes for these tests of this mojo (exec plugin) onto the project classpath for the test project.getBuild().setOutputDirectory( new File( "target/test-classes" ).getAbsolutePath() ); setVariableValueToObject( mojo, "project", project ); }
Example #4
Source File: RepositoryUtils.java From furnace with Eclipse Public License 1.0 | 6 votes |
public static ArtifactRepository toArtifactRepository(String id, String url, String layout, boolean containsReleases, boolean containsSnapshots) { MavenArtifactRepository result = new MavenArtifactRepository(); result.setId(id); result.setUrl(url); if (layout == null || layout.isEmpty() || "default".equals(layout)) { result.setLayout(new DefaultRepositoryLayout()); } else if ("p2".equals(layout)) { result.setLayout(new P2ArtifactRepositoryLayout()); } result.setReleaseUpdatePolicy(new ArtifactRepositoryPolicy(containsReleases, ArtifactRepositoryPolicy.UPDATE_POLICY_NEVER, ArtifactRepositoryPolicy.CHECKSUM_POLICY_WARN)); result.setSnapshotUpdatePolicy(new ArtifactRepositoryPolicy(containsSnapshots, ArtifactRepositoryPolicy.UPDATE_POLICY_DAILY, ArtifactRepositoryPolicy.CHECKSUM_POLICY_WARN)); return result; }
Example #5
Source File: RepositoryUtils.java From furnace with Eclipse Public License 1.0 | 6 votes |
public static ArtifactRepository convertFromMavenSettingsRepository(Repository repository) { MavenArtifactRepository result = new MavenArtifactRepository(); result.setId(repository.getId()); result.setUrl(repository.getUrl()); String layout = repository.getLayout(); if ("default".equals(layout)) result.setLayout(new DefaultRepositoryLayout()); else if ("p2".equals(layout)) result.setLayout(new P2ArtifactRepositoryLayout()); RepositoryPolicy releases = repository.getReleases(); if (releases != null) result.setReleaseUpdatePolicy(new ArtifactRepositoryPolicy(releases.isEnabled(), releases.getUpdatePolicy(), releases.getChecksumPolicy())); RepositoryPolicy snapshots = repository.getSnapshots(); if (snapshots != null) result.setSnapshotUpdatePolicy(new ArtifactRepositoryPolicy(snapshots.isEnabled(), snapshots.getUpdatePolicy(), snapshots.getChecksumPolicy())); return result; }
Example #6
Source File: DefaultArtifactDownloader.java From opoopress with Apache License 2.0 | 6 votes |
private ArtifactRepository parseRepository(String repo, ArtifactRepositoryPolicy policy) throws MojoFailureException { // if it's a simple url String id = null; ArtifactRepositoryLayout layout = getLayout("default"); String url = repo; // if it's an extended repo URL of the form id::layout::url if (repo.contains("::")) { Matcher matcher = ALT_REPO_SYNTAX_PATTERN.matcher(repo); if (!matcher.matches()) { throw new MojoFailureException(repo, "Invalid syntax for repository: " + repo, "Invalid syntax for repository. Use \"id::layout::url\" or \"URL\"."); } id = matcher.group(1).trim(); if (!StringUtils.isEmpty(matcher.group(2))) { layout = getLayout(matcher.group(2).trim()); } url = matcher.group(3).trim(); } return artifactRepositoryFactory.createArtifactRepository(id, url, layout, policy, policy); }
Example #7
Source File: MavenArtifactResolvingHelper.java From thorntail with Apache License 2.0 | 5 votes |
private RemoteRepository buildRemoteRepository(final String id, final String url, final Authentication auth, final ArtifactRepositoryPolicy releasesPolicy, final ArtifactRepositoryPolicy snapshotsPolicy) { RemoteRepository.Builder builder = new RemoteRepository.Builder(id, "default", url); if (auth != null && auth.getUsername() != null && auth.getPassword() != null) { builder.setAuthentication(new AuthenticationBuilder() .addUsername(auth.getUsername()) .addPassword(auth.getPassword()).build()); } builder.setSnapshotPolicy(new RepositoryPolicy(snapshotsPolicy.isEnabled(), snapshotsPolicy.getUpdatePolicy(), snapshotsPolicy.getChecksumPolicy())); builder.setReleasePolicy(new RepositoryPolicy(releasesPolicy.isEnabled(), releasesPolicy.getUpdatePolicy(), releasesPolicy.getChecksumPolicy())); RemoteRepository repository = builder.build(); final RemoteRepository mirror = session.getMirrorSelector().getMirror(repository); if (mirror != null) { final org.eclipse.aether.repository.Authentication mirrorAuth = session.getAuthenticationSelector() .getAuthentication(mirror); RemoteRepository.Builder mirrorBuilder = new RemoteRepository.Builder(mirror) .setId(repository.getId()) .setSnapshotPolicy(new RepositoryPolicy(snapshotsPolicy.isEnabled(), snapshotsPolicy.getUpdatePolicy(), snapshotsPolicy.getChecksumPolicy())) .setReleasePolicy(new RepositoryPolicy(releasesPolicy.isEnabled(), releasesPolicy.getUpdatePolicy(), releasesPolicy.getChecksumPolicy())); if (mirrorAuth != null) { mirrorBuilder.setAuthentication(mirrorAuth); } repository = mirrorBuilder.build(); } Proxy proxy = session.getProxySelector().getProxy(repository); if (proxy != null) { repository = new RemoteRepository.Builder(repository).setProxy(proxy).build(); } return repository; }
Example #8
Source File: DependencyResolver.java From spring-cloud-function with Apache License 2.0 | 5 votes |
private ArtifactRepository repo(String id, String url, boolean releases, boolean snapshots) { MavenArtifactRepository repository = new MavenArtifactRepository(); repository.setLayout(new DefaultRepositoryLayout()); repository.setId(id); repository.setUrl(url); ArtifactRepositoryPolicy enabled = new ArtifactRepositoryPolicy(); enabled.setEnabled(true); ArtifactRepositoryPolicy disabled = new ArtifactRepositoryPolicy(); disabled.setEnabled(false); repository.setReleaseUpdatePolicy(releases ? enabled : disabled); repository.setSnapshotUpdatePolicy(snapshots ? enabled : disabled); return repository; }
Example #9
Source File: DependencyResolver.java From spring-init with Apache License 2.0 | 5 votes |
private ArtifactRepository repo(String id, String url, boolean releases, boolean snapshots) { MavenArtifactRepository repository = new MavenArtifactRepository(); repository.setLayout(new DefaultRepositoryLayout()); repository.setId(id); repository.setUrl(url); ArtifactRepositoryPolicy enabled = new ArtifactRepositoryPolicy(); enabled.setEnabled(true); ArtifactRepositoryPolicy disabled = new ArtifactRepositoryPolicy(); disabled.setEnabled(false); repository.setReleaseUpdatePolicy(releases ? enabled : disabled); repository.setSnapshotUpdatePolicy(snapshots ? enabled : disabled); return repository; }
Example #10
Source File: MavenLocationExpander.java From pom-manipulation-ext with Apache License 2.0 | 5 votes |
private ArtifactRepositoryPolicy convertPolicy( final RepositoryPolicy policy ) { if ( policy == null ) { return new ArtifactRepositoryPolicy(); } return new ArtifactRepositoryPolicy( policy.isEnabled(), policy.getUpdatePolicy(), policy.getChecksumPolicy() ); }
Example #11
Source File: DefaultArtifactDownloader.java From opoopress with Apache License 2.0 | 5 votes |
private List<ArtifactRepository> getRemoteRepositoryList() throws MojoFailureException { List<ArtifactRepository> repositories = new ArrayList<ArtifactRepository>(); if (remoteArtifactRepositories != null) { repositories.addAll(remoteArtifactRepositories); } ArtifactRepositoryPolicy always = new ArtifactRepositoryPolicy(true, ArtifactRepositoryPolicy.UPDATE_POLICY_ALWAYS, ArtifactRepositoryPolicy.CHECKSUM_POLICY_WARN); if (remoteRepositories != null) { // Use the same format as in the deploy plugin id::layout::url List<String> repos = Arrays.asList(StringUtils.split(remoteRepositories, ",")); for (String repo : repos) { repositories.add(parseRepository(repo, always)); } } if (enableOpooPressRepos) { // Use the same format as in the deploy plugin id::layout::url ArtifactRepositoryPolicy never = new ArtifactRepositoryPolicy(true, ArtifactRepositoryPolicy.UPDATE_POLICY_NEVER, ArtifactRepositoryPolicy.CHECKSUM_POLICY_WARN); repositories.add(parseRepository(OP_RELEASES_REPO, never)); repositories.add(parseRepository(OP_SNAPSHOTS_REPO, always)); } return repositories; }
Example #12
Source File: P2ArtifactRepositoryLayout.java From furnace with Eclipse Public License 1.0 | 4 votes |
@Override public ArtifactRepository newMavenArtifactRepository(String id, String url, ArtifactRepositoryPolicy snapshots, ArtifactRepositoryPolicy releases) { return new MavenArtifactRepository(id, url, this, DISABLED_POLICY, DISABLED_POLICY); }
Example #13
Source File: MavenLocationExpanderTest.java From pom-manipulation-ext with Apache License 2.0 | 4 votes |
@Test public void locationURLs() throws Exception { final ArtifactRepositoryLayout layout = new DefaultRepositoryLayout(); final ArtifactRepositoryPolicy snapshots = new ArtifactRepositoryPolicy( true, ArtifactRepositoryPolicy.UPDATE_POLICY_DAILY, ArtifactRepositoryPolicy.CHECKSUM_POLICY_WARN ); final ArtifactRepositoryPolicy releases = new ArtifactRepositoryPolicy( true, ArtifactRepositoryPolicy.UPDATE_POLICY_NEVER, ArtifactRepositoryPolicy.CHECKSUM_POLICY_WARN ); final File localRepo = File.createTempFile( "local.repo.", ".dir" ); localRepo.deleteOnExit(); final ArtifactRepository local = new MavenArtifactRepository( "local", localRepo.toURI() .toString(), layout, snapshots, releases ); final ArtifactRepository remote = new MavenArtifactRepository( "remote", "http:///repo.maven.apache.org/maven2", layout, snapshots, releases ); final Settings settings = new Settings(); final MavenLocationExpander ex = new MavenLocationExpander( Collections.<Location> emptyList(), Collections.<ArtifactRepository> singletonList( remote ), local, new DefaultMirrorSelector(), settings, Collections.<String> emptyList() ); final List<Location> result = ex.expand( MavenLocationExpander.EXPANSION_TARGET ); assertThat( result.size(), equalTo( 2 ) ); final Iterator<Location> iterator = result.iterator(); Location loc = iterator.next(); assertThat( loc.getName(), equalTo( local.getId() ) ); assertThat( loc.getUri(), equalTo( local.getUrl() ) ); loc = iterator.next(); assertThat( loc.getName(), equalTo( remote.getId() ) ); assertThat( loc.getUri(), equalTo( remote.getUrl() ) ); }
Example #14
Source File: MavenLocationExpanderTest.java From pom-manipulation-ext with Apache License 2.0 | 4 votes |
@Test public void useActiveSettingsProfileRepos() throws Exception { final ArtifactRepositoryLayout layout = new DefaultRepositoryLayout(); final ArtifactRepositoryPolicy snapshots = new ArtifactRepositoryPolicy( true, ArtifactRepositoryPolicy.UPDATE_POLICY_DAILY, ArtifactRepositoryPolicy.CHECKSUM_POLICY_WARN ); final ArtifactRepositoryPolicy releases = new ArtifactRepositoryPolicy( true, ArtifactRepositoryPolicy.UPDATE_POLICY_NEVER, ArtifactRepositoryPolicy.CHECKSUM_POLICY_WARN ); final File localRepo = File.createTempFile( "local.repo.", ".dir" ); localRepo.deleteOnExit(); final ArtifactRepository local = new MavenArtifactRepository( "local", localRepo.toURI() .toString(), layout, snapshots, releases ); final Repository remote = new Repository(); remote.setId( "remote" ); remote.setUrl( "http:///repo.maven.apache.org/maven2" ); final Profile profile = new Profile(); profile.setId( "test" ); profile.addRepository( remote ); final Settings settings = new Settings(); settings.addProfile( profile ); final MavenLocationExpander ex = new MavenLocationExpander( Collections.<Location> emptyList(), Collections.<ArtifactRepository> emptyList(), local, new DefaultMirrorSelector(), settings, Collections.<String> singletonList( profile.getId() ) ); final List<Location> result = ex.expand( MavenLocationExpander.EXPANSION_TARGET ); assertThat( result.size(), equalTo( 2 ) ); final Iterator<Location> iterator = result.iterator(); Location loc = iterator.next(); assertThat( loc.getName(), equalTo( local.getId() ) ); assertThat( loc.getUri(), equalTo( local.getUrl() ) ); loc = iterator.next(); assertThat( loc.getName(), equalTo( remote.getId() ) ); assertThat( loc.getUri(), equalTo( remote.getUrl() ) ); }
Example #15
Source File: MavenLocationExpanderTest.java From pom-manipulation-ext with Apache License 2.0 | 4 votes |
@Test public void mirrorAdjustsLocationURLs() throws Exception { final Mirror mirror = new Mirror(); mirror.setId( "test-mirror" ); mirror.setMirrorOf( "*" ); mirror.setUrl( "http://nowhere.com" ); final ArtifactRepositoryLayout layout = new DefaultRepositoryLayout(); final ArtifactRepositoryPolicy snapshots = new ArtifactRepositoryPolicy( true, ArtifactRepositoryPolicy.UPDATE_POLICY_DAILY, ArtifactRepositoryPolicy.CHECKSUM_POLICY_WARN ); final ArtifactRepositoryPolicy releases = new ArtifactRepositoryPolicy( true, ArtifactRepositoryPolicy.UPDATE_POLICY_NEVER, ArtifactRepositoryPolicy.CHECKSUM_POLICY_WARN ); final File localRepo = File.createTempFile( "local.repo.", ".dir" ); localRepo.deleteOnExit(); final ArtifactRepository local = new MavenArtifactRepository( "local", localRepo.toURI() .toString(), layout, snapshots, releases ); final ArtifactRepository remote = new MavenArtifactRepository( "remote", "http:///repo.maven.apache.org/maven2", layout, snapshots, releases ); final Settings settings = new Settings(); settings.addMirror( mirror ); final MavenLocationExpander ex = new MavenLocationExpander( Collections.<Location> emptyList(), Collections.<ArtifactRepository> singletonList( remote ), local, new DefaultMirrorSelector(), settings, Collections.<String> emptyList() ); final List<Location> result = ex.expand( MavenLocationExpander.EXPANSION_TARGET ); assertThat( result.size(), equalTo( 2 ) ); final Iterator<Location> iterator = result.iterator(); Location loc = iterator.next(); assertThat( loc.getName(), equalTo( local.getId() ) ); assertThat( loc.getUri(), equalTo( local.getUrl() ) ); loc = iterator.next(); assertThat( loc.getName(), equalTo( mirror.getId() ) ); assertThat( loc.getUri(), equalTo( mirror.getUrl() ) ); }
Example #16
Source File: MavenLocationExpander.java From pom-manipulation-ext with Apache License 2.0 | 4 votes |
private void addSettingsProfileRepositoriesTo( final Set<Location> locs, final Settings settings, final List<String> activeProfiles, final MirrorSelector mirrorSelector ) throws MalformedURLException { if ( settings != null ) { final Map<String, Profile> profiles = settings.getProfilesAsMap(); if ( profiles != null && activeProfiles != null && !activeProfiles.isEmpty() ) { final LinkedHashSet<String> active = new LinkedHashSet<>( activeProfiles ); final List<String> settingsActiveProfiles = settings.getActiveProfiles(); if ( settingsActiveProfiles != null && !settingsActiveProfiles.isEmpty() ) { active.addAll( settingsActiveProfiles ); } for ( final String profileId : active ) { final Profile profile = profiles.get( profileId ); if ( profile != null ) { final List<Repository> repositories = profile.getRepositories(); if ( repositories != null ) { final List<Mirror> mirrors = settings.getMirrors(); final ArtifactRepositoryLayout layout = new DefaultRepositoryLayout(); for ( final Repository repo : repositories ) { String id = repo.getId(); String url = repo.getUrl(); if ( mirrors != null ) { final ArtifactRepositoryPolicy snapshots = convertPolicy( repo.getSnapshots() ); final ArtifactRepositoryPolicy releases = convertPolicy( repo.getReleases() ); final MavenArtifactRepository arepo = new MavenArtifactRepository( id, url, layout, snapshots, releases ); final Mirror mirror = mirrorSelector == null ? null : mirrorSelector.getMirror( arepo, mirrors ); if ( mirror != null ) { id = mirror.getId(); url = mirror.getUrl(); } SimpleHttpLocation addition = new SimpleHttpLocation( id, url, snapshots.isEnabled(), releases.isEnabled(), true, false, null ); addition.setAttribute(Location.CONNECTION_TIMEOUT_SECONDS, 60); locs.add (addition); } } } } } } } }
Example #17
Source File: MavenLocationExpander.java From pom-manipulation-ext with Apache License 2.0 | 4 votes |
private void addRequestRepositoriesTo( final Set<Location> locs, final List<ArtifactRepository> artifactRepositories, final Settings settings, final MirrorSelector mirrorSelector ) throws MalformedURLException { if ( artifactRepositories != null ) { for ( final ArtifactRepository repo : artifactRepositories ) { // TODO: Authentication via memory password manager. String id = repo.getId(); String url = repo.getUrl(); if ( url.startsWith( "file:" ) ) { locs.add( new SimpleLocation( id, url ) ); } else { final List<Mirror> mirrors = settings.getMirrors(); if ( mirrors != null ) { final Mirror mirror = mirrorSelector == null ? null : mirrorSelector.getMirror( repo, mirrors ); if ( mirror != null ) { id = mirror.getId(); url = mirror.getUrl(); } } final ArtifactRepositoryPolicy releases = repo.getReleases(); final ArtifactRepositoryPolicy snapshots = repo.getSnapshots(); SimpleHttpLocation addition = new SimpleHttpLocation( id, url, snapshots != null && snapshots.isEnabled(), releases == null || releases.isEnabled(), true, false, null ); addition.setAttribute(Location.CONNECTION_TIMEOUT_SECONDS, 60); locs.add (addition); } } } }
Example #18
Source File: VersioningCalculatorTest.java From pom-manipulation-ext with Apache License 2.0 | 4 votes |
@SuppressWarnings( "deprecation" ) private VersioningState setupSession( final Properties properties, final Map<ProjectRef, String[]> versionMap ) throws Exception { // Originally the default used to be 0, this was changed to be 5 but this affects this test suite so revert // just for these tests. if ( ! properties.containsKey( VersioningState.INCREMENT_SERIAL_SUFFIX_PADDING_SYSPROP ) ) { properties.setProperty( VersioningState.INCREMENT_SERIAL_SUFFIX_PADDING_SYSPROP, "0" ); } final ArtifactRepository ar = new MavenArtifactRepository( "test", TestUtils.MVN_CENTRAL, new DefaultRepositoryLayout(), new ArtifactRepositoryPolicy(), new ArtifactRepositoryPolicy() ); final MavenExecutionRequest req = new DefaultMavenExecutionRequest().setUserProperties( properties ) .setRemoteRepositories( Collections.singletonList( ar ) ); final PlexusContainer container = new DefaultPlexusContainer(); final MavenSession mavenSession = new MavenSession( container, null, req, new DefaultMavenExecutionResult() ); session = new ManipulationSession(); session.setMavenSession( mavenSession ); final VersioningState state = new VersioningState( properties ); session.setState( state ); final Map<String, byte[]> dataMap = new HashMap<>(); if ( versionMap != null && !versionMap.isEmpty() ) { for ( final Map.Entry<ProjectRef, String[]> entry : versionMap.entrySet() ) { final String path = toMetadataPath( entry.getKey() ); final byte[] data = setupMetadataVersions( entry.getValue() ); dataMap.put( path, data ); } } final Location mdLoc = MavenLocationExpander.EXPANSION_TARGET; final Transport mdTrans = new StubTransport( dataMap ); modder = new TestVersionCalculator( new ManipulationSession(), mdLoc, mdTrans, temp.newFolder( "galley-cache" ) ); return state; }
Example #19
Source File: ArtifactResolver.java From pgpverify-maven-plugin with Apache License 2.0 | 4 votes |
private static ArtifactRepositoryPolicy policyIgnoreCheckSum(ArtifactRepositoryPolicy policy) { return new ArtifactRepositoryPolicy(policy.isEnabled(), policy.getUpdatePolicy(), "ignore"); }