本文整理了Java中org.sonar.api.resources.Project.setDescription()
方法的一些代码示例,展示了Project.setDescription()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Project.setDescription()
方法的具体详情如下:
包路径:org.sonar.api.resources.Project
类名称:Project
方法名:setDescription
[英]For internal use only.
[中]仅供内部使用。
代码示例来源:origin: org.sonarsource.sonarqube/sonar-batch
public Project create(ProjectDefinition definition) {
Project project = new Project(definition.getKey(), definition.getBranch(), definition.getName());
project.setDescription(StringUtils.defaultString(definition.getDescription()));
return project;
}
代码示例来源:origin: org.codehaus.sonar/sonar-batch
public Project create(ProjectDefinition definition) {
Project project = new Project(definition.getKey(), loadProjectBranch(), definition.getName());
// For backward compatibility we must set POM and actual packaging
project.setDescription(StringUtils.defaultString(definition.getDescription()));
project.setPackaging("jar");
for (Object component : definition.getContainerExtensions()) {
if (component instanceof MavenProject) {
MavenProject pom = (MavenProject) component;
project.setPom(pom);
project.setPackaging(pom.getPackaging());
}
}
return project;
}
内容来源于网络,如有侵权,请联系作者删除!