本文整理了Java中org.sonatype.aether.artifact.Artifact.getClassifier()
方法的一些代码示例,展示了Artifact.getClassifier()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Artifact.getClassifier()
方法的具体详情如下:
包路径:org.sonatype.aether.artifact.Artifact
类名称:Artifact
方法名:getClassifier
[英]Gets the classifier of this artifact, for example "sources".
[中]获取此工件的分类器,例如“源”。
代码示例来源:origin: org.eclipse.proviso/proviso-spi
public String getClassifier()
{
return delegate.getClassifier();
}
代码示例来源:origin: sonatype/sonatype-aether
public String getClassifier()
{
return delegate.getClassifier();
}
代码示例来源:origin: de.smartics.properties/smartics-properties-resource-maven
private static String normalize(final Artifact artifact)
{
String classifier = artifact.getClassifier();
if (StringUtils.isBlank(classifier))
{
classifier = null;
}
return classifier;
}
代码示例来源:origin: org.sonatype.sisu.assembler/sisu-assembler
static String versionlessNameOf( final Artifact artifact )
{
final StringBuilder path = new StringBuilder( 128 );
path.append( artifact.getArtifactId() );
if ( artifact.getClassifier().length() > 0 )
{
path.append( '-' ).append( artifact.getClassifier() );
}
path.append( '.' ).append( artifact.getExtension() );
return path.toString();
}
代码示例来源:origin: sonatype/sonatype-aether
public String getClassifier()
{
return expand( classifier, mainArtifact.getClassifier() );
}
代码示例来源:origin: org.sonatype.sisu.assembler/sisu-assembler
static String nameOf( final Artifact artifact )
{
final StringBuilder path = new StringBuilder( 128 );
path.append( artifact.getArtifactId() ).append( '-' ).append( artifact.getVersion() );
if ( artifact.getClassifier().length() > 0 )
{
path.append( '-' ).append( artifact.getClassifier() );
}
path.append( '.' ).append( artifact.getExtension() );
return path.toString();
}
代码示例来源:origin: org.jvnet.hudson/hudson-maven-embedder
private String getConflictId( Artifact artifact )
{
StringBuilder buffer = new StringBuilder( 128 );
buffer.append( artifact.getGroupId() );
buffer.append( ':' ).append( artifact.getArtifactId() );
buffer.append( ':' ).append( artifact.getExtension() );
if ( artifact.getClassifier().length() > 0 )
{
buffer.append( ':' ).append( artifact.getClassifier() );
}
return buffer.toString();
}
代码示例来源:origin: org.sonatype.tycho.p2/p2-publisher
public static String pathOf( final Artifact artifact )
{
final StringBuilder path = new StringBuilder( 128 );
path.append( artifact.getGroupId().replace( '.', '/' ) ).append( '/' );
path.append( artifact.getArtifactId() ).append( '/' );
path.append( artifact.getBaseVersion() ).append( '/' );
path.append( artifact.getArtifactId() ).append( '-' ).append( artifact.getVersion() );
if ( artifact.getClassifier().length() > 0 )
{
path.append( '-' ).append( artifact.getClassifier() );
}
path.append( '.' ).append( artifact.getExtension() );
return path.toString();
}
代码示例来源:origin: sonatype/sonatype-aether
@Override
public int hashCode()
{
int hash = 17;
hash = hash * 31 + artifact.getArtifactId().hashCode();
hash = hash * 31 + artifact.getGroupId().hashCode();
hash = hash * 31 + artifact.getClassifier().hashCode();
hash = hash * 31 + artifact.getExtension().hashCode();
return hash;
}
代码示例来源:origin: org.sonatype.aether/aether-test-util
public String getPathForLocalArtifact( Artifact artifact )
{
String artifactId = artifact.getArtifactId();
String groupId = artifact.getGroupId();
String extension = artifact.getExtension();
String version = artifact.getVersion();
String classifier = artifact.getClassifier();
String path =
String.format( "%s/%s/%s/%s-%s-%s%s.%s", groupId, artifactId, version, groupId, artifactId, version,
classifier, extension );
return path;
}
代码示例来源:origin: sonatype/sonatype-aether
public String getPathForLocalArtifact( Artifact artifact )
{
String artifactId = artifact.getArtifactId();
String groupId = artifact.getGroupId();
String extension = artifact.getExtension();
String version = artifact.getVersion();
String classifier = artifact.getClassifier();
String path =
String.format( "%s/%s/%s/%s-%s-%s%s.%s", groupId, artifactId, version, groupId, artifactId, version,
classifier, extension );
return path;
}
代码示例来源:origin: sonatype/sonatype-aether
@Override
public String toString()
{
return artifact.getGroupId() + ':' + artifact.getArtifactId() + ':' + artifact.getClassifier() + ':'
+ artifact.getExtension();
}
代码示例来源:origin: org.sonatype.aether/aether-impl
private String getId( Artifact a )
{
return a.getGroupId() + ':' + a.getArtifactId() + ':' + a.getClassifier() + ':' + a.getExtension();
}
代码示例来源:origin: sonatype/sonatype-aether
private String getId( Artifact a )
{
return a.getGroupId() + ':' + a.getArtifactId() + ':' + a.getClassifier() + ':' + a.getExtension();
}
代码示例来源:origin: org.jboss.forge/maven-impl
@Override
public DependencySelector deriveChildSelector(DependencyCollectionContext context)
{
if ((depth > 0) && FORGE_ADDON.equals(context.getDependency().getArtifact().getClassifier()))
{
return new StaticDependencySelector(false);
}
return new AddonDependencySelector(context.getDependency(), depth + 1);
}
代码示例来源:origin: io.fabric8.fab/fab-core
public static DependencyId newInstance(Artifact artifact) {
return new DependencyId(artifact.getGroupId(), artifact.getArtifactId(), artifact.getClassifier(), artifact.getExtension());
}
代码示例来源:origin: org.fusesource.fabric.fab/fab-core
public static DependencyId newInstance(Artifact artifact) {
return new DependencyId(artifact.getGroupId(), artifact.getArtifactId(), artifact.getClassifier(), artifact.getExtension());
}
代码示例来源:origin: io.takari.m2e.workspace/org.eclipse.m2e.workspace.cli
public File findArtifact(org.sonatype.aether.artifact.Artifact artifact) {
return WorkspaceState2.getInstance().findArtifact(artifact.getGroupId(), artifact.getArtifactId(),
artifact.getExtension(), artifact.getClassifier(), artifact.getBaseVersion());
}
代码示例来源:origin: org.daisy.pipeline/pax-exam-helper
private MavenBundle(Artifact artifact, boolean forceVersionAsInProject) {
groupId(artifact.getGroupId());
artifactId(artifact.getArtifactId());
type(artifact.getExtension());
classifier(artifact.getClassifier());
if (!forceVersionAsInProject)
version(artifact.getVersion());
}
代码示例来源:origin: com.simpligility.org.apache.maven.shared/maven-dependency-tree
private Artifact getDependencyArtifact( Dependency dep )
{
org.sonatype.aether.artifact.Artifact artifact = dep.getArtifact();
return factory.createDependencyArtifact( artifact.getGroupId(), artifact.getArtifactId(),
VersionRange.createFromVersion( artifact.getVersion() ),
artifact.getProperty( "type", artifact.getExtension() ),
artifact.getClassifier(), dep.getScope(), dep.isOptional() );
}
内容来源于网络,如有侵权,请联系作者删除!