本文整理汇总了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);
}
}
示例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);
}
示例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 );
}
示例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);
}
示例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);
}
}
示例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());
}
示例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());
}