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


Java ModuleRevisionId.getName方法代码示例

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


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

示例1: populateModuleDescriptorWithPublication

import org.apache.ivy.core.module.id.ModuleRevisionId; //导入方法依赖的package包/类
static void populateModuleDescriptorWithPublication(DefaultModuleDescriptor descriptor,
        JkMavenPublication publication, Instant publishDate) {

    final ModuleRevisionId moduleRevisionId = descriptor.getModuleRevisionId();
    final String artifactName = moduleRevisionId.getName();
    final Artifact mavenMainArtifact = toPublishedMavenArtifact(publication.mainArtifactFiles()
            .get(0), artifactName, null, moduleRevisionId, publishDate);
    final String mainConf = "default";
    populateDescriptorWithMavenArtifact(descriptor, mainConf, mavenMainArtifact);

    for (final JkClassifiedFileArtifact artifactEntry : publication.classifiedArtifacts()) {
        final Path file = artifactEntry.file();
        final String classifier = artifactEntry.classifier();
        final Artifact mavenArtifact = toPublishedMavenArtifact(file, artifactName, classifier,
                descriptor.getModuleRevisionId(), publishDate);
        populateDescriptorWithMavenArtifact(descriptor, classifier, mavenArtifact);
    }
}
 
开发者ID:jerkar,项目名称:jerkar,代码行数:19,代码来源:IvyTranslations.java

示例2: createIvyArtifact

import org.apache.ivy.core.module.id.ModuleRevisionId; //导入方法依赖的package包/类
public Artifact createIvyArtifact(PublishArtifact publishArtifact, ModuleRevisionId moduleRevisionId) {
    Map<String, String> extraAttributes = new HashMap<String, String>();
    if (GUtil.isTrue(publishArtifact.getClassifier())) {
        extraAttributes.put(Dependency.CLASSIFIER, publishArtifact.getClassifier());
    }
    String name = publishArtifact.getName();
    if (!GUtil.isTrue(name)) {
        name = moduleRevisionId.getName();
    }
    return new DefaultArtifact(
            moduleRevisionId,
            publishArtifact.getDate(),
            name,
            publishArtifact.getType(),
            publishArtifact.getExtension(),
            extraAttributes);
}
 
开发者ID:Pushjet,项目名称:Pushjet-Android,代码行数:18,代码来源:DefaultConfigurationsToArtifactsConverter.java

示例3: ivy2aether

import org.apache.ivy.core.module.id.ModuleRevisionId; //导入方法依赖的package包/类
private static org.fedoraproject.xmvn.artifact.Artifact ivy2aether( ModuleRevisionId revision, String extension )
{
    String groupId = revision.getOrganisation();
    String artifactId = revision.getName();
    String classifier = revision.getExtraAttribute( "classifier" );
    String version = revision.getRevision();

    return new org.fedoraproject.xmvn.artifact.DefaultArtifact( groupId, artifactId, extension, classifier,
                                                                version );
}
 
开发者ID:fedora-java,项目名称:xmvn,代码行数:11,代码来源:IvyResolver.java

示例4: toPublishedArtifact

import org.apache.ivy.core.module.id.ModuleRevisionId; //导入方法依赖的package包/类
static Artifact toPublishedArtifact(JkIvyPublication.Artifact artifact,
        ModuleRevisionId moduleId, Instant date) {
    final String artifactName = JkUtilsString.isBlank(artifact.name) ? moduleId.getName()
            : artifact.name;
    final String extension = JkUtilsObject.firstNonNull(artifact.extension, "");
    final String type = JkUtilsObject.firstNonNull(artifact.type, extension);
    return new DefaultArtifact(moduleId, new Date(date.toEpochMilli()), artifactName, type, extension);
}
 
开发者ID:jerkar,项目名称:jerkar,代码行数:9,代码来源:IvyTranslations.java

示例5: makePom

import org.apache.ivy.core.module.id.ModuleRevisionId; //导入方法依赖的package包/类
private Path makePom(ModuleDescriptor moduleDescriptor, JkMavenPublication publication) {
    final ModuleRevisionId ivyModuleRevisionId = moduleDescriptor.getModuleRevisionId();
    final String artifactName = ivyModuleRevisionId.getName();
    final Path pomXml;
    if (this.descriptorOutputDir != null) {
        pomXml = Paths.get(targetDir()).resolve("published-pom-" + ivyModuleRevisionId.getOrganisation()
        + "-" + artifactName + "-" + ivyModuleRevisionId.getRevision() + ".xml");
    } else {
        pomXml = JkUtilsPath.createTempFile("published-pom-", ".xml");
    }
    final String packaging = JkUtilsString.substringAfterLast(publication.mainArtifactFiles()
            .get(0).getFileName().toString(), ".");
    final PomWriterOptions pomWriterOptions = new PomWriterOptions();
    pomWriterOptions.setArtifactPackaging(packaging);
    Path fileToDelete = null;
    if (publication.extraInfo() != null) {
        final Path template = PomTemplateGenerator.generateTemplate(publication.extraInfo());
        pomWriterOptions.setTemplate(template.toFile());
        fileToDelete = template;
    }
    try {
        PomModuleDescriptorWriter.write(moduleDescriptor, pomXml.toFile(), pomWriterOptions);
        if (fileToDelete != null) {
            Files.deleteIfExists(fileToDelete);
        }
        return pomXml;
    } catch (final IOException e) {
        throw JkUtilsThrowable.unchecked(e);
    }
}
 
开发者ID:jerkar,项目名称:jerkar,代码行数:31,代码来源:IvyPublisherForMaven.java

示例6: newId

import org.apache.ivy.core.module.id.ModuleRevisionId; //导入方法依赖的package包/类
public static ModuleVersionIdentifier newId(ModuleRevisionId moduleRevisionId) {
    return new DefaultModuleVersionIdentifier(moduleRevisionId.getOrganisation(), moduleRevisionId.getName(), moduleRevisionId.getRevision());
}
 
开发者ID:Pushjet,项目名称:Pushjet-Android,代码行数:4,代码来源:DefaultModuleVersionIdentifier.java

示例7: DefaultDependencyMetaData

import org.apache.ivy.core.module.id.ModuleRevisionId; //导入方法依赖的package包/类
public DefaultDependencyMetaData(DependencyDescriptor dependencyDescriptor) {
    this.dependencyDescriptor = dependencyDescriptor;
    ModuleRevisionId dependencyRevisionId = dependencyDescriptor.getDependencyRevisionId();
    requested = new DefaultModuleVersionSelector(dependencyRevisionId.getOrganisation(), dependencyRevisionId.getName(), dependencyRevisionId.getRevision());
}
 
开发者ID:Pushjet,项目名称:Pushjet-Android,代码行数:6,代码来源:DefaultDependencyMetaData.java


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