本文整理了Java中org.apache.maven.model.Extension.getArtifactId()
方法的一些代码示例,展示了Extension.getArtifactId()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Extension.getArtifactId()
方法的具体详情如下:
包路径:org.apache.maven.model.Extension
类名称:Extension
方法名:getArtifactId
[英]Get the artifact ID of the extension.
[中]获取扩展的工件ID。
代码示例来源:origin: apache/maven
@Override
protected Object getExtensionKey( Extension extension )
{
return extension.getGroupId() + ':' + extension.getArtifactId();
}
代码示例来源:origin: apache/maven
/**
* @see java.lang.Object#hashCode()
*/
public int hashCode()
{
int result = 17;
result = 37 * result + ( getArtifactId() != null ? getArtifactId().hashCode() : 0 );
result = 37 * result + ( getGroupId() != null ? getGroupId().hashCode() : 0 );
result = 37 * result + ( getVersion() != null ? getVersion().hashCode() : 0 );
return result;
}
代码示例来源:origin: apache/maven
protected void mergeExtension_ArtifactId( Extension target, Extension source, boolean sourceDominant,
Map<Object, Object> context )
{
String src = source.getArtifactId();
if ( src != null )
{
if ( sourceDominant || target.getArtifactId() == null )
{
target.setArtifactId( src );
target.setLocation( "artifactId", source.getLocation( "artifactId" ) );
}
}
}
代码示例来源:origin: org.apache.maven/maven-project
artifactFactory.createExtensionArtifact( ext.getGroupId(), ext.getArtifactId(), versionRange );
"' for extension '" + ArtifactUtils.versionlessKey( ext.getGroupId(), ext.getArtifactId() ) +
"': " + e.getMessage(), e );
代码示例来源:origin: apache/maven
/**
* @see java.lang.Object#equals(java.lang.Object)
*/
public boolean equals( Object o )
{
if ( this == o )
{
return true;
}
if ( !( o instanceof Extension ) )
{
return false;
}
Extension e = (Extension) o;
if ( !equal( e.getArtifactId(), getArtifactId() ) )
{
return false;
}
else if ( !equal( e.getGroupId(), getGroupId() ) )
{
return false;
}
else if ( !equal( e.getVersion(), getVersion() ) )
{
return false;
}
return true;
}
代码示例来源:origin: org.apache.maven/maven-project
public static Extension cloneExtension( Extension src )
{
Extension rExt = new Extension();
rExt.setArtifactId( src.getArtifactId() );
rExt.setGroupId( src.getGroupId() );
rExt.setVersion( src.getVersion() );
return rExt;
}
代码示例来源:origin: org.apache.maven/maven-project
String extensionId = ArtifactUtils.versionlessKey( extension.getGroupId(), extension.getArtifactId() );
if ( dag.getVertex( extensionId ) != null )
代码示例来源:origin: apache/maven
extension.getArtifactId(), extension.getVersion(), false, true );
代码示例来源:origin: apache/maven
plugin.setArtifactId( extension.getArtifactId() );
plugin.setVersion( extension.getVersion() );
extensionPlugins.add( plugin );
代码示例来源:origin: apache/maven
/**
* Method writeExtension.
*
* @param extension
* @param serializer
* @param tagName
* @throws java.io.IOException
*/
private void writeExtension( Extension extension, String tagName, XmlSerializer serializer )
throws java.io.IOException
{
serializer.startTag( NAMESPACE, tagName );
if ( extension.getGroupId() != null )
{
serializer.startTag( NAMESPACE, "groupId" ).text( extension.getGroupId() ).endTag( NAMESPACE, "groupId" );
}
if ( extension.getArtifactId() != null )
{
serializer.startTag( NAMESPACE, "artifactId" ).text( extension.getArtifactId() ).endTag( NAMESPACE, "artifactId" );
}
if ( extension.getVersion() != null )
{
serializer.startTag( NAMESPACE, "version" ).text( extension.getVersion() ).endTag( NAMESPACE, "version" );
}
serializer.endTag( NAMESPACE, tagName );
} //-- void writeExtension( Extension, String, XmlSerializer )
代码示例来源:origin: apache/maven
repositorySystem.createArtifact( ext.getGroupId(), ext.getArtifactId(), version, null, "jar" );
代码示例来源:origin: takari/polyglot-maven
out.write(" extension(" + br);
out.write(" groupId -> \"" + extension.getGroupId() + "\"," + br);
out.write(" artifactId -> \"" + extension.getArtifactId() + "\"");
if (extension.getVersion() != null) {
out.write("," + br);
代码示例来源:origin: takari/polyglot-maven
/**
* Method writeExtension.
*
* @param extension
* @param serializer
* @param tagName
* @throws java.io.IOException
*/
private void writeExtension( Extension extension, String tagName, XmlSerializer serializer )
throws java.io.IOException
{
serializer.startTag( NAMESPACE, tagName );
if ( extension.getGroupId() != null )
{
serializer.attribute( NAMESPACE, "groupId", extension.getGroupId() );
}
if ( extension.getArtifactId() != null )
{
serializer.attribute( NAMESPACE, "artifactId", extension.getArtifactId() );
}
if ( extension.getVersion() != null )
{
serializer.attribute( NAMESPACE, "version", extension.getVersion() );
}
serializer.endTag( NAMESPACE, tagName );
} //-- void writeExtension( Extension, String, XmlSerializer )
代码示例来源:origin: org.apache.maven/maven-model-builder
@Override
protected Object getExtensionKey( Extension extension )
{
return extension.getGroupId() + ':' + extension.getArtifactId();
}
代码示例来源:origin: io.tesla.maven/maven-model
/**
* @see java.lang.Object#hashCode()
*/
public int hashCode()
{
int result = 17;
result = 37 * result + ( getArtifactId() != null ? getArtifactId().hashCode() : 0 );
result = 37 * result + ( getGroupId() != null ? getGroupId().hashCode() : 0 );
result = 37 * result + ( getVersion() != null ? getVersion().hashCode() : 0 );
return result;
}
代码示例来源:origin: io.tesla.maven/maven-model
protected void mergeExtension_ArtifactId( Extension target, Extension source, boolean sourceDominant,
Map<Object, Object> context )
{
String src = source.getArtifactId();
if ( src != null )
{
if ( sourceDominant || target.getArtifactId() == null )
{
target.setArtifactId( src );
target.setLocation( "artifactId", source.getLocation( "artifactId" ) );
}
}
}
代码示例来源:origin: org.netbeans.api/org-netbeans-modules-maven-embedder
@Override
public void addExtension(Extension extension, Model originatingModel, List remoteRepositories, MavenExecutionRequest request) throws ExtensionManagerException {
String key = extension.getGroupId() + ":" + extension.getArtifactId();
openSesame(key);
try {
LOG.fine("add extension1=" + extension.getGroupId() + ":" + extension.getArtifactId() + ":" + extension.getVersion()); //NOI18N
super.addExtension(extension, originatingModel, remoteRepositories, request);
} finally {
LOG.fine("---------------------------------------------------------");
closeSesame(key);
}
}
代码示例来源:origin: org.netbeans.api/org-netbeans-modules-maven-embedder
@Override
public void addExtension(Extension extension, MavenProject project, MavenExecutionRequest request) throws ExtensionManagerException {
String key = extension.getGroupId() + ":" + extension.getArtifactId();
openSesame(key);
try {
LOG.fine("add extension2=" + extension.getGroupId() + ":" + extension.getArtifactId() + ":" + extension.getVersion());
super.addExtension(extension, project, request);
} finally {
LOG.fine("---------------------------------------------------------");
closeSesame(key);
}
}
代码示例来源:origin: org.apache.maven.shared/maven-artifact-transfer
/**
* @param extension {@link Extension} to be converted to {@link DependableCoordinate}
* @return {@link DependableCoordinate}
*/
public static DependableCoordinate toDependableCoordinate( Extension extension )
{
DefaultDependableCoordinate coordinate = new DefaultDependableCoordinate();
coordinate.setGroupId( extension.getGroupId() );
coordinate.setArtifactId( extension.getArtifactId() );
coordinate.setVersion( extension.getVersion() );
return coordinate;
}
代码示例来源:origin: org.apache.maven.shared/maven-artifact-transfer
/**
* Special case: an extension is always of type {@code jar}, so can be transformed to an ArtifactCoordinate.
*
* @param extension {@link Extension}
* @return {@link ArtifactCoordinate}
*/
public static ArtifactCoordinate toArtifactCoordinate( Extension extension )
{
DefaultArtifactCoordinate coordinate = new DefaultArtifactCoordinate();
coordinate.setGroupId( extension.getGroupId() );
coordinate.setArtifactId( extension.getArtifactId() );
coordinate.setVersion( extension.getVersion() );
return coordinate;
}
内容来源于网络,如有侵权,请联系作者删除!