本文整理了Java中org.apache.maven.model.Repository.setUrl
方法的一些代码示例,展示了Repository.setUrl
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Repository.setUrl
方法的具体详情如下:
包路径:org.apache.maven.model.Repository
类名称:Repository
方法名:setUrl
[英]Set The URL to the project's browsable SCM repository, such as ViewVC or Fisheye.
[中]将URL设置为项目的可浏览SCM存储库,如ViewVC或Fisheye。
代码示例来源: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.setUrl( interpolatedTrimmed( parser.nextText(), "url" ) );
代码示例来源:origin: apache/maven
repository.setUrl( interpolatedTrimmed( parser.nextText(), "url" ) );
代码示例来源: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.setUrl( getTrimmedValue( value ) );
代码示例来源:origin: rickardoberg/neomvn
RepositoryModelResolver( File repository, String mavenRepository )
{
this.repository = repository;
this.mavenRepository = mavenRepository;
Repository mainRepo = new Repository();
mainRepo.setUrl( mavenRepository );
mainRepo.setId( "central" );
repositories.add(mainRepo);
}
代码示例来源:origin: org.jboss.forge/forge-javaee-impl
@Override
public Repository getAptPluginRepository()
{
Repository repo = new Repository();
repo.setName("EclipseLink");
repo.setUrl("http://download.eclipse.org/rt/eclipselink/maven.repo");
return repo;
}
代码示例来源:origin: takari/polyglot-maven
Repository repository = new Repository();
repository.setId(Integer.toString(repoUrl.hashCode()));
repository.setUrl(repoUrl);
model.addRepository(repository);
代码示例来源:origin: org.kie.workbench.services/kie-wb-common-services-backend
private void update(Set<RepositoryKey> currentRepositories, Set<RepositoryKey> updates){
for(RepositoryKey udate: updates){
for(RepositoryKey repo: currentRepositories){
if(repo.getRepository().getId().equals(udate.getRepository().getId())){
repo.getRepository().setUrl(udate.getRepository().getUrl());
}
}
}
}
代码示例来源:origin: org.guvnor/guvnor-project-backend
private Repository fromClientModelToPom(final org.guvnor.common.services.project.model.Repository from) {
Repository to = new Repository();
to.setId(from.getId());
to.setName(from.getName());
to.setUrl(from.getUrl());
return to;
}
代码示例来源:origin: org.kie.guvnor/guvnor-project-backend
private Repository fromClientModelToPom(org.kie.guvnor.project.model.Repository from) {
Repository to = new Repository();
to.setId(from.getId());
to.setName(from.getName());
to.setUrl(from.getUrl());
return to;
}
代码示例来源:origin: org.kie.workbench.services/kie-wb-common-services-backend
private Repository getRepositoryUpdate(JsonArray pluginRepositories, int i) {
Repository repo = new Repository();
repo.setId(pluginRepositories.getJsonObject(i).getString("id"));
repo.setUrl(pluginRepositories.getJsonObject(i).getString("url"));
return repo;
}
}
代码示例来源:origin: org.uberfire/uberfire-project-backend
private Repository fromClientModelToPom(final MavenRepository from) {
Repository to = new Repository();
to.setId(from.getId());
to.setName(from.getName());
to.setUrl(from.getUrl());
return to;
}
代码示例来源:origin: org.kie.workbench.services/kie-wb-common-project-backend
private Repository fromClientModelToPom(org.kie.workbench.common.services.project.service.model.Repository from) {
Repository to = new Repository();
to.setId(from.getId());
to.setName(from.getName());
to.setUrl(from.getUrl());
return to;
}
代码示例来源:origin: kiegroup/appformer
private Repository fromClientModelToPom(final MavenRepository from) {
Repository to = new Repository();
to.setId(from.getId());
to.setName(from.getName());
to.setUrl(from.getUrl());
return to;
}
代码示例来源:origin: org.jboss.forge.addon/maven-api
public ProfileAdapter(final org.apache.maven.settings.Profile profile)
{
setId(profile.getId());
Activation activation = new Activation();
setActivation(activation);
for (org.apache.maven.settings.Repository repository : profile.getRepositories())
{
Repository mavenRepository = new Repository();
mavenRepository.setId(repository.getId());
mavenRepository.setUrl(repository.getUrl());
getRepositories().add(mavenRepository);
}
setProperties(profile.getProperties());
}
代码示例来源: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;
}
内容来源于网络,如有侵权,请联系作者删除!