本文整理了Java中org.apache.maven.model.Repository.setReleases
方法的一些代码示例,展示了Repository.setReleases
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Repository.setReleases
方法的具体详情如下:
包路径:org.apache.maven.model.Repository
类名称:Repository
方法名:setReleases
[英]Set how to handle downloading of releases from this repository.
[中]设置如何处理从此存储库下载版本。
代码示例来源:origin: apache/maven
protected void mergeRepository_Releases( Repository target, Repository source, boolean sourceDominant,
Map<Object, Object> context )
{
RepositoryPolicy src = source.getReleases();
if ( src != null )
{
RepositoryPolicy tgt = target.getReleases();
if ( tgt == null )
{
tgt = new RepositoryPolicy();
target.setReleases( tgt );
}
mergeRepositoryPolicy( tgt, src, sourceDominant, context );
}
}
代码示例来源:origin: org.apache.maven/maven-project
public static Repository cloneRepository( Repository src )
{
if ( src == null )
{
return null;
}
Repository result = new Repository();
result.setReleases( cloneRepositoryPolicy( src.getReleases() ) );
result.setSnapshots( cloneRepositoryPolicy( src.getSnapshots() ) );
cloneRepositoryBaseFields( src, result );
return result;
}
代码示例来源:origin: apache/maven
public static org.apache.maven.model.Repository fromSettingsRepository( org.apache.maven.settings.Repository
settingsRepository )
{
org.apache.maven.model.Repository modelRepository = new org.apache.maven.model.Repository();
modelRepository.setId( settingsRepository.getId() );
modelRepository.setLayout( settingsRepository.getLayout() );
modelRepository.setName( settingsRepository.getName() );
modelRepository.setUrl( settingsRepository.getUrl() );
modelRepository.setReleases( fromSettingsRepositoryPolicy( settingsRepository.getReleases() ) );
modelRepository.setSnapshots( fromSettingsRepositoryPolicy( settingsRepository.getSnapshots() ) );
return modelRepository;
}
代码示例来源:origin: apache/maven
private static Repository convertFromProfileXmlRepository( org.apache.maven.profiles.Repository profileXmlRepo )
{
Repository repo = new Repository();
repo.setId( profileXmlRepo.getId() );
repo.setLayout( profileXmlRepo.getLayout() );
repo.setName( profileXmlRepo.getName() );
repo.setUrl( profileXmlRepo.getUrl() );
if ( profileXmlRepo.getSnapshots() != null )
{
repo.setSnapshots( convertRepositoryPolicy( profileXmlRepo.getSnapshots() ) );
}
if ( profileXmlRepo.getReleases() != null )
{
repo.setReleases( convertRepositoryPolicy( profileXmlRepo.getReleases() ) );
}
return repo;
}
代码示例来源:origin: apache/maven
/**
* @param settingsRepo
* @return a repository
*/
private static org.apache.maven.model.Repository convertFromSettingsRepository( Repository settingsRepo )
{
org.apache.maven.model.Repository repo = new org.apache.maven.model.Repository();
repo.setId( settingsRepo.getId() );
repo.setLayout( settingsRepo.getLayout() );
repo.setName( settingsRepo.getName() );
repo.setUrl( settingsRepo.getUrl() );
if ( settingsRepo.getSnapshots() != null )
{
repo.setSnapshots( convertRepositoryPolicy( settingsRepo.getSnapshots() ) );
}
if ( settingsRepo.getReleases() != null )
{
repo.setReleases( convertRepositoryPolicy( settingsRepo.getReleases() ) );
}
return repo;
}
代码示例来源:origin: apache/maven
repository.setReleases( parseRepositoryPolicy( parser, strict ) );
代码示例来源:origin: apache/maven
repository.setReleases( parseRepositoryPolicy( parser, strict, source ) );
代码示例来源:origin: takari/polyglot-maven
public default Repository repository(String id, String name, String url, String layout, RepositoryPolicy releases, RepositoryPolicy snapshots) {
Repository repository = new Repository();
if (id != null) {
repository.setId(id);
}
if (name != null) {
repository.setName(name);
}
if (url != null) {
repository.setUrl(url);
}
if (layout != null) {
repository.setLayout(layout);
}
if (releases != null) {
repository.setReleases(releases);
}
if (snapshots != null) {
repository.setSnapshots(snapshots);
}
return repository;
}
代码示例来源:origin: takari/polyglot-maven
repository.setReleases( parseRepositoryPolicy( parser, strict ) );
代码示例来源:origin: io.tesla.maven/maven-model
protected void mergeRepository_Releases( Repository target, Repository source, boolean sourceDominant,
Map<Object, Object> context )
{
RepositoryPolicy src = source.getReleases();
if ( src != null )
{
RepositoryPolicy tgt = target.getReleases();
if ( tgt == null )
{
tgt = new RepositoryPolicy();
target.setReleases( tgt );
}
mergeRepositoryPolicy( tgt, src, sourceDominant, context );
}
}
代码示例来源:origin: org.jboss.shrinkwrap.resolver/shrinkwrap-resolver-impl-maven
private static Repository asRepository(org.apache.maven.settings.Repository repository) {
Repository mavenRepository = new Repository();
if (repository != null) {
mavenRepository.setId(repository.getId());
mavenRepository.setLayout(repository.getLayout());
mavenRepository.setName(repository.getName());
mavenRepository.setUrl(repository.getUrl());
mavenRepository.setReleases(asMavenRepositoryPolicy(repository.getReleases()));
mavenRepository.setSnapshots(asMavenRepositoryPolicy(repository.getSnapshots()));
}
return mavenRepository;
}
代码示例来源:origin: shrinkwrap/resolver
private static Repository asRepository(org.apache.maven.settings.Repository repository) {
Repository mavenRepository = new Repository();
if (repository != null) {
mavenRepository.setId(repository.getId());
mavenRepository.setLayout(repository.getLayout());
mavenRepository.setName(repository.getName());
mavenRepository.setUrl(repository.getUrl());
mavenRepository.setReleases(asMavenRepositoryPolicy(repository.getReleases()));
mavenRepository.setSnapshots(asMavenRepositoryPolicy(repository.getSnapshots()));
}
return mavenRepository;
}
代码示例来源:origin: org.commonjava.maven.cartographer/cartographer
repository.setReleases( releasesPolicy );
代码示例来源:origin: org.commonjava.cartographer/cartographer
repository.setReleases( releasesPolicy );
代码示例来源:origin: apache/maven-enforcer
private Repository createSnapshotRepository( String id, String url )
{
Repository r = new Repository();
r.setId( id );
r.setUrl( url );
RepositoryPolicy snapshotPolicy = new RepositoryPolicy();
snapshotPolicy.setEnabled( true );
snapshotPolicy.setUpdatePolicy( "daily" );
r.setSnapshots( snapshotPolicy );
RepositoryPolicy releasePolicy = new RepositoryPolicy();
releasePolicy.setEnabled( false );
r.setReleases( releasePolicy );
return r;
}
代码示例来源:origin: apache/maven-enforcer
private Repository createRepository( String id, String url )
{
Repository r = new Repository();
r.setId( id );
r.setUrl( url );
RepositoryPolicy snapshotPolicy = new RepositoryPolicy();
snapshotPolicy.setEnabled( false );
snapshotPolicy.setUpdatePolicy( "daily" );
r.setSnapshots( snapshotPolicy );
RepositoryPolicy releasePolicy = new RepositoryPolicy();
releasePolicy.setEnabled( true );
releasePolicy.setUpdatePolicy( "never" );
r.setReleases( releasePolicy );
return r;
}
代码示例来源:origin: io.tesla.maven/maven-model
repository.setReleases( parseRepositoryPolicy( parser, strict ) );
代码示例来源:origin: io.tesla.maven/maven-model
repository.setReleases( parseRepositoryPolicy( parser, strict, source ) );
内容来源于网络,如有侵权,请联系作者删除!