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

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

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

Model.addLicense介绍

[英]Method addLicense.
[中]方法addLicense。

代码示例

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

public void addLicense( License license )
{
  getModel().addLicense( license );
}

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

public void addLicense( License license )
{
  getModel().addLicense( license );
}

代码示例来源:origin: ru.yandex.qatools.clay/clay-maven-settings-builder

/**
 * Method addLicense.
 *
 * @param license
 */
public FluentModelBuilder withLicense(License license) {
  model.addLicense(license);
  return this;
}

代码示例来源:origin: com.buschmais.jqassistant.plugin/jqassistant.plugin.m2repo

@Override
public void addLicense(License license) {
  delegate.addLicense(license);
}

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

model.addLicense( parseLicense( "license", xmlStreamReader, strict, encoding ) );

代码示例来源:origin: OpenLiberty/open-liberty

private static void setLicense(Model model, String version, boolean feature, boolean restrictedLicense, boolean isWebsphereLiberty) {
  License license = new License();
  if (!isWebsphereLiberty) {
    license.setName(Constants.LICENSE_NAME_EPL);
    license.setUrl(Constants.LICENSE_URL_EPL);
    license.setDistribution(Constants.LICENSE_DISTRIBUTION_REPO);
  } else if (feature) {
    license.setName(Constants.LICENSE_NAME_FEATURE_TERMS);
    license.setUrl(Constants.LICENSE_URL_FEATURE_TERMS_PREFIX + version + (restrictedLicense ? Constants.LICENSE_URL_FEATURE_TERMS_RESTRICTED_SUFFIX : Constants.LICENSE_URL_FEATURE_TERMS_SUFFIX));
    license.setDistribution(Constants.LICENSE_DISTRIBUTION_REPO);
  } else {
    license.setName(Constants.LICENSE_NAME_MAVEN);
    license.setUrl(Constants.LICENSE_URL_MAVEN);
    license.setDistribution(Constants.LICENSE_DISTRIBUTION_REPO);
    license.setComments(Constants.LICENSE_COMMENTS_MAVEN);
  }
  model.addLicense(license);
}

代码示例来源:origin: org.apache.maven.plugins/maven-eclipse-plugin

license.setName( "Eclipse Public License - v 1.0" ); //$NON-NLS-1$
license.setUrl( "http://www.eclipse.org/org/documents/epl-v10.html" ); //$NON-NLS-1$
model.addLicense( license );

相关文章

Model类方法