d.setVersion(prj.getVersion()); d.setPackagePath(displayName); if (prj.getDescription() != null) { JarAnalyzer.addDescription(d, prj.getDescription(), "project", "description");
public String getDescription() { return wrapped.getDescription(); }
@Override public String getDescription( Locale locale ) { String desc; if ( project.getDescription() != null ) { // TODO How to handle i18n? desc = project.getDescription(); } else { return getI18nString( locale, "nodescription" ); } return desc; }
public String getShortDescription() { String desc = null; if (desc == null) { desc = getOriginalMavenProject().getDescription(); } if (desc == null) { desc = NbBundle.getMessage(NbMavenProject.class, "LBL_DefaultDescription"); } return desc; }
public String getDescription() { if ( this.metadata != null ) { return this.metadata.getDescription(); } return project.getDescription(); }
public String getDescription() { return getMavenProject().getDescription(); }
public String getDescription() { return getMavenProject().getDescription(); } //-- String getDescription()
@Nullable protected String getDefaultDescription() { if (StringUtils.isNotBlank(description)) { return description; } if (StringUtils.isNotBlank(title)) { StringBuilder description = new StringBuilder("<h1>").append(title).append("</h1>"); if (StringUtils.isNotBlank(project.getDescription())) { description.append("<p>").append(project.getDescription()).append("</p>"); } return description.toString(); } return null; }
public String getDescription() { return getDelegate().getDescription(); }
@Nullable protected String getDefaultDescription() { if (StringUtils.isNotBlank(description)) { return description; } if (StringUtils.isNotBlank(title)) { StringBuilder description = new StringBuilder("<h1>").append(title).append("</h1>"); if (StringUtils.isNotBlank(project.getDescription())) { description.append("<p>").append(project.getDescription()).append("</p>"); } return description.toString(); } return null; }
private Document createBasePomFromScratch() throws Exception { getLog().info("Creating a new pom.xml for the starter from scratch"); Template pomTemplate = getTemplate("spring-boot-starter-template-pom.template"); Map<String, String> props = new HashMap<>(); props.put("version", project.getVersion()); props.put("componentId", getComponentId()); props.put("componentName", project.getName()); props.put("componentDescription", project.getDescription()); StringWriter sw = new StringWriter(); pomTemplate.process(props, sw); String xml = sw.toString(); ByteArrayInputStream bin = new ByteArrayInputStream(xml.getBytes("UTF-8")); DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder(); Document pom = builder.parse(bin); return pom; }
protected File createPackage(final Collection<Resource> resources, final File inputDir) throws MojoExecutionException { try { final URI homepage = project.getUrl() == null ? null : URI.create(project.getUrl()); new PackageBuilder(project.getArtifactId(), project.getDescription(), homepage, log, Optional.fromNullable(pgp)) .createPackage(resources, inputDir, outputFile); return outputFile; } catch (PackagingException e) { throw new MojoExecutionException("Failed to create Debian package", e); } } }
private Properties buildLaunchScriptProperties() { Properties properties = new Properties(); if (this.embeddedLaunchScriptProperties != null) { properties.putAll(this.embeddedLaunchScriptProperties); } putIfMissing(properties, "initInfoProvides", this.project.getArtifactId()); putIfMissing(properties, "initInfoShortDescription", this.project.getName(), this.project.getArtifactId()); putIfMissing(properties, "initInfoDescription", removeLineBreaks(this.project.getDescription()), this.project.getName(), this.project.getArtifactId()); return properties; }
/** * initialize properties shared with template */ protected void initTemplateProperties( Site site ) { processProperties( site ); getProperties().put("pageTitle", getTitle()); getProperties().put("artifactId", project.getArtifactId()); getProperties().put("version", project.getVersion()); getProperties().put("groupId", project.getGroupId()); getProperties().put("name", project.getName()); getProperties().put("description", project.getDescription()); final java.util.Properties projectProps = project.getProperties(); if( projectProps!=null ) { for(Map.Entry<Object,Object> e : projectProps.entrySet()){ getProperties().put( String.valueOf(e.getKey()), String.valueOf(e.getValue()) ); } } }
private Properties createProjectProperties() { final Properties props = new Properties(); final MavenProject prj = this.session.getCurrentProject(); props.put("project.groupId", Strings.emptyIfNull(prj.getGroupId())); //$NON-NLS-1$ props.put("project.artifactId", Strings.emptyIfNull(prj.getArtifactId())); //$NON-NLS-1$ props.put("project.basedir", prj.getBasedir() != null ? prj.getBasedir().getAbsolutePath() : ""); //$NON-NLS-1$ //$NON-NLS-2$ props.put("project.description", Strings.emptyIfNull(prj.getDescription())); //$NON-NLS-1$ props.put("project.id", Strings.emptyIfNull(prj.getId())); //$NON-NLS-1$ props.put("project.inceptionYear", Strings.emptyIfNull(prj.getInceptionYear())); //$NON-NLS-1$ props.put("project.name", Strings.emptyIfNull(prj.getName())); //$NON-NLS-1$ props.put("project.version", Strings.emptyIfNull(prj.getVersion())); //$NON-NLS-1$ props.put("project.url", Strings.emptyIfNull(prj.getUrl())); //$NON-NLS-1$ props.put("project.encoding", Strings.emptyIfNull(this.encoding)); //$NON-NLS-1$ return props; }
private Map<String, String> computeSonarQubeProperties(MavenProject pom) throws MojoExecutionException { Map<String, String> props = new HashMap<>(); defineModuleKey(pom, props, specifiedProjectKey); props.put(ScanProperties.PROJECT_VERSION, pom.getVersion()); props.put(ScanProperties.PROJECT_NAME, pom.getName()); String description = pom.getDescription(); if (description != null) { props.put(ScanProperties.PROJECT_DESCRIPTION, description); } guessJavaVersion(pom, props); guessEncoding(pom, props); convertMavenLinksToProperties(props, pom); synchronizeFileSystemAndOtherProps(pom, props); findBugsExcludeFileMaven(pom, props); return props; }
public void execute() throws MojoExecutionException { Archetype archetype = new Archetype(); archetype.setGroupId( project.getGroupId() ); archetype.setArtifactId( project.getArtifactId() ); archetype.setVersion( project.getVersion() ); if ( StringUtils.isNotEmpty( project.getDescription() ) ) { archetype.setDescription( project.getDescription() ); } else { archetype.setDescription( project.getName() ); } manager.updateLocalCatalog( session.getProjectBuildingRequest(), archetype ); } }
private void configureMetadata(SenchaPackageOrAppConfigBuilder configBuilder) { String version = SenchaUtils.getSenchaVersionForMavenVersion(project.getVersion()); if (version == null) { version = SENCHA_FALLBACK_VERSION; getLog().warn("Could not determine Sencha version from maven version " + project.getVersion() + ", falling back to " + version + "."); } configBuilder.name(getSenchaPackageName(project.getGroupId(), project.getArtifactId())); configBuilder.version(version); configBuilder.creator(StringUtils.defaultString(project.getOrganization() != null ? project.getOrganization().getName() : "")); configBuilder.summary(StringUtils.defaultString(project.getDescription())); }
public BintrayPackage createPackage(MavenProject mavenProject, String repository){ CreatePackageRequest request = new CreatePackageRequest(); request.setName(mavenProject.getArtifactId()); request.setDescription(mavenProject.getDescription()); String githubUrl = mavenProject.getScm().getUrl(); if(githubUrl.endsWith("/")) githubUrl = StringUtils.stripEnd(githubUrl, "/"); String githubRepo = githubUrl.substring(githubUrl.lastIndexOf("/")).replace(".git", ""); request.setVcsUrl(githubUrl + (githubUrl.endsWith(".git") ? "" : ".git")); request.setGithubRepo(OPENMRS_USERNAME+githubRepo); request.setWebsiteUrl("http://openmrs.org/"); request.setIssueTrackerUrl(new DefaultJira().getJiraUrl()); //so far all OpenMRS projects have MPL-2.0 license request.setLicenses(Arrays.asList("MPL-2.0")); return createPackage(OPENMRS_USERNAME, repository, request); }
@VisibleForTesting void merge(MavenProject pom, ProjectDefinition definition) { String key = getSonarKey(pom); // IMPORTANT NOTE : reference on properties from POM model must not be saved, // instead they should be copied explicitly - see SONAR-2896 definition .setProperties(pom.getModel().getProperties()) .setKey(key) .setVersion(pom.getVersion()) .setName(pom.getName()) .setDescription(pom.getDescription()) .addContainerExtension(pom); guessJavaVersion(pom, definition); guessEncoding(pom, definition); convertMavenLinksToProperties(definition, pom); synchronizeFileSystem(pom, definition); }