本文整理了Java中org.apache.maven.model.Parent.getVersion()
方法的一些代码示例,展示了Parent.getVersion()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Parent.getVersion()
方法的具体详情如下:
包路径:org.apache.maven.model.Parent
类名称:Parent
方法名:getVersion
[英]Get the version of the parent project to inherit.
[中]获取要继承的父项目的版本。
代码示例来源:origin: apache/maven
/**
* @return the id as <code>groupId:artifactId:version</code>
*/
public String getId()
{
StringBuilder id = new StringBuilder( 64 );
id.append( getGroupId() );
id.append( ":" );
id.append( getArtifactId() );
id.append( ":" );
id.append( "pom" );
id.append( ":" );
id.append( getVersion() );
return id.toString();
}
代码示例来源:origin: apache/maven
protected void mergeParent_Version( Parent target, Parent source, boolean sourceDominant,
Map<Object, Object> context )
{
String src = source.getVersion();
if ( src != null )
{
if ( sourceDominant || target.getVersion() == null )
{
target.setVersion( src );
target.setLocation( "version", source.getLocation( "version" ) );
}
}
}
代码示例来源:origin: kiegroup/drools
projVersionStr = model.getVersion();
if( projVersionStr == null ) {
projVersionStr = model.getParent().getVersion();
代码示例来源:origin: org.apache.maven/maven-project
public String getVersion()
{
String version = getModel().getVersion();
if ( ( version == null ) && ( getModel().getParent() != null ) )
{
version = getModel().getParent().getVersion();
}
return version;
}
代码示例来源:origin: apache/maven
public String getVersion()
{
String version = getModel().getVersion();
if ( ( version == null ) && ( getModel().getParent() != null ) )
{
version = getModel().getParent().getVersion();
}
return version;
}
代码示例来源:origin: apache/maven
parent.getVersion() );
parent.getVersion() ),
parent.getGroupId(), parent.getArtifactId(), parent.getVersion() );
parent.getVersion() ),
parent.getGroupId(), parent.getArtifactId(), parent.getVersion() );
return resolveModel( parent.getGroupId(), parent.getArtifactId(), parent.getVersion() );
parent.getVersion(), e );
代码示例来源:origin: apache/maven
parent.getVersion() );
parent.getVersion() ),
parent.getGroupId(), parent.getArtifactId(), parent.getVersion() );
parent.getVersion() ),
parent.getGroupId(), parent.getArtifactId(), parent.getVersion() );
return resolveModel( parent.getGroupId(), parent.getArtifactId(), parent.getVersion() );
parent.getVersion(), e );
代码示例来源:origin: apache/maven
parent.getVersion(), true, false );
代码示例来源:origin: org.apache.maven/maven-project
public static Parent cloneParent( Parent src )
{
if ( src == null )
{
return null;
}
Parent result = new Parent();
result.setArtifactId( src.getArtifactId() );
result.setGroupId( src.getGroupId() );
result.setRelativePath( src.getRelativePath() );
result.setVersion( src.getVersion() );
return result;
}
代码示例来源:origin: apache/maven
String version = parent.getVersion();
if ( !parent.getVersion().equals( version ) )
parent.getVersion() );
代码示例来源:origin: apache/maven
resolver.resolveRawModel( parent.getGroupId(), parent.getArtifactId(), parent.getVersion() );
if ( version == null && candidateModel.getParent() != null )
version = candidateModel.getParent().getVersion();
return null;
if ( version != null && parent.getVersion() != null && !version.equals( parent.getVersion() ) )
VersionRange parentRange = VersionRange.createFromVersionSpec( parent.getVersion() );
if ( !parentRange.hasRestrictions() )
代码示例来源:origin: apache/maven
/**
* Method writeParent.
*
* @param parent
* @param serializer
* @param tagName
* @throws java.io.IOException
*/
private void writeParent( Parent parent, String tagName, XmlSerializer serializer )
throws java.io.IOException
{
serializer.startTag( NAMESPACE, tagName );
if ( parent.getGroupId() != null )
{
serializer.startTag( NAMESPACE, "groupId" ).text( parent.getGroupId() ).endTag( NAMESPACE, "groupId" );
}
if ( parent.getArtifactId() != null )
{
serializer.startTag( NAMESPACE, "artifactId" ).text( parent.getArtifactId() ).endTag( NAMESPACE, "artifactId" );
}
if ( parent.getVersion() != null )
{
serializer.startTag( NAMESPACE, "version" ).text( parent.getVersion() ).endTag( NAMESPACE, "version" );
}
if ( ( parent.getRelativePath() != null ) && !parent.getRelativePath().equals( "../pom.xml" ) )
{
serializer.startTag( NAMESPACE, "relativePath" ).text( parent.getRelativePath() ).endTag( NAMESPACE, "relativePath" );
}
serializer.endTag( NAMESPACE, tagName );
} //-- void writeParent( Parent, String, XmlSerializer )
代码示例来源:origin: org.apache.maven/maven-project
"Parent element is a duplicate of " + "the current project " );
else if ( StringUtils.isEmpty( parentModel.getVersion() ) )
createCacheKey( parentModel.getGroupId(), parentModel.getArtifactId(), parentModel.getVersion() );
MavenProject parentProject = (MavenProject) rawProjectCache.get( parentKey );
if ( ( candidateParentVersion == null ) && ( candidateParent.getParent() != null ) )
candidateParentVersion = candidateParent.getParent().getVersion();
parentModel.getVersion().equals( candidateParentVersion ) )
parentModel.getVersion() );
代码示例来源:origin: apache/maven
String interpolated = ssi.interpolate( interpolatedModel.getParent().getVersion() );
interpolatedModel.getParent().setVersion( interpolated );
new ModelProblemCollectorRequest( Severity.ERROR,
Version.BASE ).setMessage( "Failed to interpolate field: "
+ interpolatedModel.getParent().getVersion()
+ " on class: " ).setException( e );
problems.add( mpcr );
代码示例来源:origin: apache/maven
child.setVersion( child.getParent().getVersion() );
代码示例来源:origin: org.apache.maven/maven-project
child.setVersion( child.getParent().getVersion() );
代码示例来源:origin: apache/maven
String version = parent.getVersion();
代码示例来源:origin: apache/maven
parent );
validateStringNotEmpty( "parent.version", problems, Severity.FATAL, Version.BASE, parent.getVersion(),
parent );
if ( equals( "LATEST", parent.getVersion() ) || equals( "RELEASE", parent.getVersion() ) )
代码示例来源:origin: takari/polyglot-maven
private void id(PrintWriter pw, Model model) {
String groupId = model.getGroupId();
if (groupId == null & model.getParent() != null) {
groupId = model.getParent().getGroupId();
}
String version = model.getVersion();
if (version == null && model.getParent() != null) {
version = model.getParent().getVersion();
}
pw.println(indent + "id: " + groupId + ":" + model.getArtifactId() + ":" + version);
}
代码示例来源:origin: takari/polyglot-maven
void id(Model model) {
String groupId = model.getGroupId();
if (groupId == null & model.getParent() != null) {
groupId = model.getParent().getGroupId();
}
String version = model.getVersion();
if (version == null && model.getParent() != null) {
version = model.getParent().getVersion();
}
p.println("id", groupId + ":" + model.getArtifactId() + ":"
+ version);
}
内容来源于网络,如有侵权,请联系作者删除!