org.apache.maven.model.Model.getUrl()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(6.3k)|赞(0)|评价(0)|浏览(114)

本文整理了Java中org.apache.maven.model.Model.getUrl()方法的一些代码示例,展示了Model.getUrl()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Model.getUrl()方法的具体详情如下:
包路径:org.apache.maven.model.Model
类名称:Model
方法名:getUrl

Model.getUrl介绍

[英]Get the URL to the project's homepage.
Default value is: parent value [+ path adjustment] + (artifactId or project.directory property), or just parent value if project's child.project.url.inherit.append.path="false"
[中]获取项目主页的URL。
默认值为:父值[+路径调整]+(artifactId或project.directory属性),如果项目的child.project.url.inherit.append.path="false",则仅为父值

代码示例

代码示例来源:origin: org.apache.maven/maven-project

public String getUrl()
{
  return getModel().getUrl();
}

代码示例来源:origin: apache/maven

public String getUrl()
{
  return getModel().getUrl();
}

代码示例来源:origin: apache/maven

protected void mergeModel_Url( Model target, Model source, boolean sourceDominant, Map<Object, Object> context )
{
  String src = source.getUrl();
  if ( src != null )
  {
    if ( sourceDominant || target.getUrl() == null )
    {
      target.setUrl( src );
      target.setLocation( "url", source.getLocation( "url" ) );
    }
  }
}

代码示例来源:origin: apache/maven

@Override
protected void mergeModel_Url( Model target, Model source, boolean sourceDominant, Map<Object, Object> context )
{
  String src = source.getUrl();
  if ( src != null )
  {
    if ( sourceDominant )
    {
      target.setUrl( src );
      target.setLocation( "url", source.getLocation( "url" ) );
    }
    else if ( target.getUrl() == null )
    {
      target.setUrl( extrapolateChildUrl( src, source.isChildProjectUrlInheritAppendPath(), context ) );
      target.setLocation( "url", source.getLocation( "url" ) );
    }
  }
}

代码示例来源:origin: org.apache.maven/maven-project

projectArtifact.setDownloadUrl( model.getUrl() );

代码示例来源:origin: apache/maven

if ( child.getUrl() == null )
  if ( parent.getUrl() != null )
    child.setUrl( appendPath( parent.getUrl(), child.getArtifactId(), childPathAdjustment, appendPaths ) );
    child.setUrl( parent.getUrl() );

代码示例来源:origin: org.apache.maven/maven-project

if ( child.getUrl() == null )
  if ( parent.getUrl() != null )
    child.setUrl( appendPath( parent.getUrl(), child.getArtifactId(), childPathAdjustment, appendPaths ) );
    child.setUrl( parent.getUrl() );

代码示例来源:origin: apache/maven

if ( model.getUrl() != null )
  serializer.startTag( NAMESPACE, "url" ).text( model.getUrl() ).endTag( NAMESPACE, "url" );

代码示例来源:origin: apache/maven

@Override
public void normalize( Model model, ModelBuildingRequest request )
{
  if ( model == null )
  {
    return;
  }
  model.setUrl( normalize( model.getUrl() ) );
  Scm scm = model.getScm();
  if ( scm != null )
  {
    scm.setUrl( normalize( scm.getUrl() ) );
    scm.setConnection( normalize( scm.getConnection() ) );
    scm.setDeveloperConnection( normalize( scm.getDeveloperConnection() ) );
  }
  DistributionManagement dist = model.getDistributionManagement();
  if ( dist != null )
  {
    Site site = dist.getSite();
    if ( site != null )
    {
      site.setUrl( normalize( site.getUrl() ) );
    }
  }
}

代码示例来源:origin: takari/polyglot-maven

private void project(PrintWriter pw, Model model) {
 String name = model.getName();
 if (name == null) {
  name = model.getArtifactId();
 }
 String url = model.getUrl() == null ? "" : model.getUrl();
 pw.print("project \"" + name + "\" @ \"" + url + "\"");
 packaging(pw, model);
}

代码示例来源:origin: org.apache.maven/maven-project

result.setUrl( src.getUrl() );
result.setVersion( src.getVersion() );

代码示例来源:origin: mojohaus/flatten-maven-plugin

@Override
public String get( Model model )
{
  return model.getUrl();
}

代码示例来源:origin: org.xwiki.platform/xwiki-core-extension-api

public String getWebSite()
{
  return this.mavenModel.getUrl();
}

代码示例来源:origin: stackoverflow.com

listView.setOnItemClickListener(new android.widget.AdapterView.OnItemClickListener() {
public void onItemClick(AdapterView<?> parent, View view,int position, long id) {
Model item = (Model)contests_listView.getItemAtPosition(position);  
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(item.getUrl()));
startActivity(browserIntent);  // show url in browser  or pass it to your webview activity
  }
});

代码示例来源:origin: takari/polyglot-maven

if ( model.getUrl() != null )
  serializer.startTag( NAMESPACE, "url" ).text( model.getUrl() ).endTag( NAMESPACE, "url" );

代码示例来源:origin: io.tesla.polyglot/tesla-polyglot-atom

private void project(PrintWriter pw, Model model) {
 String name = model.getName();
 if (name == null) {
  name = model.getArtifactId();
 }
 String url = model.getUrl() == null ? "" : model.getUrl();
 pw.print("project \"" + name + "\" @ \"" + url + "\"");
 packaging(pw, model);
}

代码示例来源:origin: io.takari.polyglot/polyglot-atom

private void project(PrintWriter pw, Model model) {
 String name = model.getName();
 if (name == null) {
  name = model.getArtifactId();
 }
 String url = model.getUrl() == null ? "" : model.getUrl();
 pw.print("project \"" + name + "\" @ \"" + url + "\"");
 packaging(pw, model);
}

代码示例来源:origin: io.tesla.maven/maven-model

protected void mergeModel_Url( Model target, Model source, boolean sourceDominant, Map<Object, Object> context )
{
  String src = source.getUrl();
  if ( src != null )
  {
    if ( sourceDominant || target.getUrl() == null )
    {
      target.setUrl( src );
      target.setLocation( "url", source.getLocation( "url" ) );
    }
  }
}

代码示例来源:origin: stackoverflow.com

Model selectedSong =  MainController.getInstance().getSongs().get(position); 
 i.putExtra("name", selectedSong.getName());
 i.putExtra("singer", selectedSong.getSinger());
 i.putExtra("url", selectedSong.getUrl());
 startActivity(i);

代码示例来源:origin: takari/polyglot-maven

void project(Model model) {
  String name = model.getName();
  if (name == null) {
    name = model.getArtifactId();
  }
  p.printStartBlock( "project", name, model.getUrl() );
  p.println();
  p.println( "model_version", model.getModelVersion() );
  p.println( "inception_year", model.getInceptionYear() );
  id(model);
  parent(model.getParent());
  p.println("packaging", model.getPackaging());
  p.println();
  description(model.getDescription());
  developers( model.getDevelopers() );
  issueManagement( model.getIssueManagement() );
  mailingLists( model.getMailingLists() );
  repositories( toRepositoryArray( model.getRepositories() ) );
  pluginRepositories( toRepositoryArray( model.getPluginRepositories() ) );
  sourceControl( model.getScm() );
  distribution( model.getDistributionManagement() );
  properties( model.getProperties() );
  dependencies( model.getDependencies() );
  modules( model.getModules() );
  managements( model.getDependencyManagement(), model.getBuild() );
  build( model.getBuild(), model.getBuild() );
  profiles( model.getProfiles() );
  reporting( model.getReporting() );
  p.printEndBlock();
}

相关文章

Model类方法