Java 类org.apache.maven.model.RepositoryBase 实例源码

项目:apache-maven-shade-plugin    文件:MavenJDOMWriter.java   
/**
 * Method updateRepositoryBase
 *
 * @param value
 * @param element
 * @param counter
 * @param xmlTag
 */
protected void updateRepositoryBase( RepositoryBase value, String xmlTag, Counter counter, Element element )
{
    boolean shouldExist = value != null;
    Element root = updateElement( counter, element, xmlTag, shouldExist );
    if ( shouldExist )
    {
        Counter innerCount = new Counter( counter.getDepth() + 1 );
        findAndReplaceSimpleElement( innerCount, root, "id", value.getId(), null );
        findAndReplaceSimpleElement( innerCount, root, "name", value.getName(), null );
        findAndReplaceSimpleElement( innerCount, root, "url", value.getUrl(), null );
        findAndReplaceSimpleElement( innerCount, root, "layout", value.getLayout(), "default" );
    }
}
项目:maven-shade-plugin    文件:MavenJDOMWriter.java   
/**
 * Method updateRepositoryBase
 *
 * @param value
 * @param element
 * @param counter
 * @param xmlTag
 */
protected void updateRepositoryBase( RepositoryBase value, String xmlTag, Counter counter, Element element )
{
    boolean shouldExist = value != null;
    Element root = updateElement( counter, element, xmlTag, shouldExist );
    if ( shouldExist )
    {
        Counter innerCount = new Counter( counter.getDepth() + 1 );
        findAndReplaceSimpleElement( innerCount, root, "id", value.getId(), null );
        findAndReplaceSimpleElement( innerCount, root, "name", value.getName(), null );
        findAndReplaceSimpleElement( innerCount, root, "url", value.getUrl(), null );
        findAndReplaceSimpleElement( innerCount, root, "layout", value.getLayout(), "default" );
    }
}
项目:oceano    文件:ModelMerger.java   
protected void mergeRepositoryBase( RepositoryBase target, RepositoryBase source, boolean sourceDominant,
                                    Map<Object, Object> context )
{
    mergeRepositoryBase_Id( target, source, sourceDominant, context );
    mergeRepositoryBase_Name( target, source, sourceDominant, context );
    mergeRepositoryBase_Url( target, source, sourceDominant, context );
    mergeRepositoryBase_Layout( target, source, sourceDominant, context );
}
项目:oceano    文件:ModelMerger.java   
protected void mergeRepositoryBase_Id( RepositoryBase target, RepositoryBase source, boolean sourceDominant,
                                       Map<Object, Object> context )
{
    String src = source.getId();
    if ( src != null )
    {
        if ( sourceDominant || target.getId() == null )
        {
            target.setId( src );
            target.setLocation( "id", source.getLocation( "id" ) );
        }
    }
}
项目:oceano    文件:ModelMerger.java   
protected void mergeRepositoryBase_Url( RepositoryBase target, RepositoryBase source, boolean sourceDominant,
                                        Map<Object, Object> context )
{
    String src = source.getUrl();
    if ( src != null )
    {
        if ( sourceDominant || target.getUrl() == null )
        {
            target.setUrl( src );
            target.setLocation( "url", source.getLocation( "url" ) );
        }
    }
}
项目:oceano    文件:ModelMerger.java   
protected void mergeRepositoryBase_Name( RepositoryBase target, RepositoryBase source, boolean sourceDominant,
                                         Map<Object, Object> context )
{
    String src = source.getName();
    if ( src != null )
    {
        if ( sourceDominant || target.getName() == null )
        {
            target.setName( src );
            target.setLocation( "name", source.getLocation( "name" ) );
        }
    }
}
项目:oceano    文件:ModelMerger.java   
protected void mergeRepositoryBase_Layout( RepositoryBase target, RepositoryBase source, boolean sourceDominant,
                                           Map<Object, Object> context )
{
    String src = source.getLayout();
    if ( src != null )
    {
        if ( sourceDominant || target.getLayout() == null )
        {
            target.setLayout( src );
            target.setLocation( "layout", source.getLocation( "layout" ) );
        }
    }
}
项目:oceano    文件:ModelMerger.java   
protected Object getRepositoryBaseKey( RepositoryBase object )
{
    return object;
}
项目:oceano    文件:MavenModelMerger.java   
@Override
protected Object getRepositoryBaseKey( RepositoryBase object )
{
    return object.getId();
}