本文整理汇总了Java中org.apache.maven.model.Repository.setSnapshots方法的典型用法代码示例。如果您正苦于以下问题:Java Repository.setSnapshots方法的具体用法?Java Repository.setSnapshots怎么用?Java Repository.setSnapshots使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.maven.model.Repository
的用法示例。
在下文中一共展示了Repository.setSnapshots方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: visitPluginRepository
import org.apache.maven.model.Repository; //导入方法依赖的package包/类
private void visitPluginRepository( ModelVisitor visitor, Repository repository )
{
RepositoryPolicy releases = repository.getReleases();
if ( releases != null )
{
visitor.visitPluginRepositoryRelease( releases );
releases = visitor.replacePluginRepositoryRelease( releases );
repository.setReleases( releases );
}
RepositoryPolicy snapshots = repository.getSnapshots();
if ( snapshots != null )
{
visitor.visitPluginRepositorySnapshot( snapshots );
snapshots = visitor.replacePluginRepositorySnapshot( snapshots );
repository.setSnapshots( snapshots );
}
}
示例2: visitProfilePluginRepository
import org.apache.maven.model.Repository; //导入方法依赖的package包/类
private void visitProfilePluginRepository( ModelVisitor visitor, Repository repository )
{
RepositoryPolicy releases = repository.getReleases();
if ( releases != null )
{
visitor.visitProfilePluginRepositoryRelease( releases );
releases = visitor.replaceProfilePluginRepositoryRelease( releases );
repository.setReleases( releases );
}
RepositoryPolicy snapshots = repository.getSnapshots();
if ( snapshots != null )
{
visitor.visitProfilePluginRepositorySnapshot( snapshots );
snapshots = visitor.replaceProfilePluginRepositorySnapshot( snapshots );
repository.setSnapshots( snapshots );
}
}
示例3: visitProfileRepository
import org.apache.maven.model.Repository; //导入方法依赖的package包/类
private void visitProfileRepository( ModelVisitor visitor, Repository repository )
{
RepositoryPolicy releases = repository.getReleases();
if ( releases != null )
{
visitor.visitProfileRepositoryRelease( releases );
releases = visitor.replaceProfileRepositoryRelease( releases );
repository.setReleases( releases );
}
RepositoryPolicy snapshots = repository.getSnapshots();
if ( snapshots != null )
{
visitor.visitProfileRepositorySnapshot( snapshots );
snapshots = visitor.replaceProfileRepositorySnapshot( snapshots );
repository.setSnapshots( snapshots );
}
}
示例4: visitRepository
import org.apache.maven.model.Repository; //导入方法依赖的package包/类
private void visitRepository( ModelVisitor visitor, Repository repository )
{
RepositoryPolicy releases = repository.getReleases();
if ( releases != null )
{
visitor.visitRepositoryRelease( releases );
releases = visitor.replaceRepositoryRelease( releases );
repository.setReleases( releases );
}
RepositoryPolicy snapshots = repository.getSnapshots();
if ( snapshots != null )
{
visitor.visitRepositorySnapshot( snapshots );
snapshots = visitor.replaceRepositorySnapshot( snapshots );
repository.setSnapshots( snapshots );
}
}
示例5: convertToMavenRepository
import org.apache.maven.model.Repository; //导入方法依赖的package包/类
public static Repository convertToMavenRepository(MavenRemoteRepository repository) {
Repository result = new Repository();
result.setId(repository.getId());
result.setName(repository.getName());
result.setUrl(repository.getUrl());
if (repository.getLayout() == null) {
result.setLayout("default");
} else {
result.setLayout(repository.getLayout());
}
if (repository.getSnapshotsPolicy() != null) {
result.setSnapshots(convertToMavenPolicy(repository.getSnapshotsPolicy()));
}
if (repository.getReleasesPolicy() != null) {
result.setReleases(convertToMavenPolicy(repository.getReleasesPolicy()));
}
return result;
}
示例6: convertFromProfileXmlRepository
import org.apache.maven.model.Repository; //导入方法依赖的package包/类
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;
}
示例7: getRemoteRepositories
import org.apache.maven.model.Repository; //导入方法依赖的package包/类
protected List<ArtifactRepository> getRemoteRepositories()
throws Exception
{
File repoDir = new File( getBasedir(), "src/test/remote-repo" ).getAbsoluteFile();
RepositoryPolicy policy = new RepositoryPolicy();
policy.setEnabled( true );
policy.setChecksumPolicy( "ignore" );
policy.setUpdatePolicy( "always" );
Repository repository = new Repository();
repository.setId( RepositorySystem.DEFAULT_REMOTE_REPO_ID );
repository.setUrl( "file://" + repoDir.toURI().getPath() );
repository.setReleases( policy );
repository.setSnapshots( policy );
return Arrays.asList( repositorySystem.buildArtifactRepository( repository ) );
}
示例8: getRemoteRepositories
import org.apache.maven.model.Repository; //导入方法依赖的package包/类
protected List<ArtifactRepository> getRemoteRepositories()
throws InvalidRepositoryException
{
File repoDir = new File( getBasedir(), "src/test/remote-repo" ).getAbsoluteFile();
RepositoryPolicy policy = new RepositoryPolicy();
policy.setEnabled( true );
policy.setChecksumPolicy( "ignore" );
policy.setUpdatePolicy( "always" );
Repository repository = new Repository();
repository.setId( RepositorySystem.DEFAULT_REMOTE_REPO_ID );
repository.setUrl( "file://" + repoDir.toURI().getPath() );
repository.setReleases( policy );
repository.setSnapshots( policy );
return Arrays.asList( repositorySystem.buildArtifactRepository( repository ) );
}
示例9: getGlobalRepositoryFromPreference
import org.apache.maven.model.Repository; //导入方法依赖的package包/类
protected Repository getGlobalRepositoryFromPreference() {
String repoURL =
preferencesService.getString("org.wso2.developerstudio.eclipse.platform.ui",
GLOBAL_REPOSITORY_URL, null, null);
if (repoURL != null) {
Repository repo = new Repository();
repo.setUrl(repoURL);
repo.setId(preferencesService.getString("org.wso2.developerstudio.eclipse.platform.ui",
GLOBAL_REPOSITORY_ID, null, null));
RepositoryPolicy releasePolicy = new RepositoryPolicy();
String releaseEnabled =
preferencesService.getString("org.wso2.developerstudio.eclipse.platform.ui",
RELEASES_ENABLED, null, null);
releasePolicy.setEnabled(releaseEnabled != null);
releasePolicy.setUpdatePolicy(preferencesService.getString("org.wso2.developerstudio.eclipse.platform.ui",
RELEASES_UPDATE_POLICY, null, null));
releasePolicy.setChecksumPolicy(preferencesService.getString("org.wso2.developerstudio.eclipse.platform.ui",
RELEASES_CHECKSUM_POLICY, null, null));
repo.setReleases(releasePolicy);
RepositoryPolicy snapshotPolicy = new RepositoryPolicy();
String snapshotsEnabled =
preferencesService.getString("org.wso2.developerstudio.eclipse.platform.ui",
SNAPSHOTS_ENABLED, null, null);
snapshotPolicy.setEnabled(snapshotsEnabled != null);
snapshotPolicy.setUpdatePolicy(preferencesService.getString("org.wso2.developerstudio.eclipse.platform.ui",
SNAPSHOTS_UPDATE_POLICY, null, null));
snapshotPolicy.setChecksumPolicy(preferencesService.getString("org.wso2.developerstudio.eclipse.platform.ui",
SNAPSHOTS_CHECKSUM_POLICY, null, null));
repo.setSnapshots(snapshotPolicy);
return repo;
}
return null;
}