当前位置: 首页>>代码示例>>Java>>正文


Java Pom.getGroupId方法代码示例

本文整理汇总了Java中org.springframework.roo.project.maven.Pom.getGroupId方法的典型用法代码示例。如果您正苦于以下问题:Java Pom.getGroupId方法的具体用法?Java Pom.getGroupId怎么用?Java Pom.getGroupId使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.springframework.roo.project.maven.Pom的用法示例。


在下文中一共展示了Pom.getGroupId方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getTopLevelPackage

import org.springframework.roo.project.maven.Pom; //导入方法依赖的package包/类
public JavaPackage getTopLevelPackage(final String moduleName) {
    final Pom pom = getPomFromModuleName(moduleName);
    if (pom != null) {
        return new JavaPackage(pom.getGroupId());
    }
    return null;
}
 
开发者ID:gvSIGAssociation,项目名称:gvnix1,代码行数:8,代码来源:AbstractProjectOperations.java

示例2: get

import org.springframework.roo.project.maven.Pom; //导入方法依赖的package包/类
public MetadataItem get(final String metadataId) {
    Validate.isTrue(ProjectMetadata.isValid(metadataId),
            "Unexpected metadata request '%s' for this provider",
            metadataId);
    // Just rebuild on demand. We always do this as we expect
    // MetadataService to cache on our behalf

    final Pom pom = pomManagementService
            .getPomFromModuleName(ProjectMetadata.getModuleName(metadataId));
    // Read the file, if it is available
    if (pom == null || !fileManager.exists(pom.getPath())) {
        return null;
    }

    final JavaPackage topLevelPackage = new JavaPackage(pom.getGroupId());
    // Update UAA with the project name
    uaaRegistrationService.registerProject(
            UaaRegistrationService.SPRING_ROO,
            topLevelPackage.getFullyQualifiedPackageName());

    // Update UAA with the well-known Spring-related open source
    // dependencies
    for (final ProductInfo productInfo : uaaDetectedProducts
            .getDetectedProductInfos()) {
        if (productInfo.getProductName().equals(
                UaaRegistrationService.SPRING_ROO.getName())) {
            // No need to register with a less robust pom.xml-declared
            // dependency metadata when we did it ourselves with a proper
            // bundle version number lookup a moment ago...
            continue;
        }
        if (productInfo.getProductName().equals(
                UaaDetectedProducts.SPRING_UAA.getProductName())) {
            // No need to register Spring UAA as this happens automatically
            // internal to UAA
            continue;
        }
        final Dependency dependency = new Dependency(
                productInfo.getGroupId(), productInfo.getArtifactId(),
                "version_is_ignored_for_searching");
        final Set<Dependency> dependenciesExcludingVersion = pom
                .getDependenciesExcludingVersion(dependency);
        if (!dependenciesExcludingVersion.isEmpty()) {
            // This dependency was detected
            final Dependency first = dependenciesExcludingVersion
                    .iterator().next();
            // Convert the detected dependency into a Product as best we can
            String versionSequence = first.getVersion();
            // Version sequence given; see if it looks like a property
            if (versionSequence != null && versionSequence.startsWith("${")
                    && versionSequence.endsWith("}")) {
                // Strip the ${ } from the version sequence
                final String propertyName = versionSequence.replace("${",
                        "").replace("}", "");
                final Set<Property> prop = pom
                        .getPropertiesExcludingValue(new Property(
                                propertyName));
                if (!prop.isEmpty()) {
                    // Take the first one's value and treat that as the
                    // version sequence
                    versionSequence = prop.iterator().next().getValue();
                }
            }
            // Handle there being no version sequence
            if (versionSequence == null || "".equals(versionSequence)) {
                versionSequence = "0.0.0.UNKNOWN";
            }
            final Product product = VersionHelper.getProduct(
                    productInfo.getProductName(), versionSequence);
            // Register the Spring Product with UAA
            uaaRegistrationService.registerProject(product,
                    topLevelPackage.getFullyQualifiedPackageName());
        }
    }

    return new ProjectMetadata(pom);
}
 
开发者ID:gvSIGAssociation,项目名称:gvnix1,代码行数:78,代码来源:MavenProjectMetadataProvider.java

示例3: getTopLevelPackageForModule

import org.springframework.roo.project.maven.Pom; //导入方法依赖的package包/类
public String getTopLevelPackageForModule(final Pom module) {
    return module.getGroupId();
}
 
开发者ID:gvSIGAssociation,项目名称:gvnix1,代码行数:4,代码来源:TypeLocationServiceImpl.java


注:本文中的org.springframework.roo.project.maven.Pom.getGroupId方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。