当前位置: 首页>>代码示例>>Java>>正文


Java CiManagement类代码示例

本文整理汇总了Java中org.apache.maven.model.CiManagement的典型用法代码示例。如果您正苦于以下问题:Java CiManagement类的具体用法?Java CiManagement怎么用?Java CiManagement使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


CiManagement类属于org.apache.maven.model包,在下文中一共展示了CiManagement类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: writeCiManagement

import org.apache.maven.model.CiManagement; //导入依赖的package包/类
private void writeCiManagement(CiManagement ciManagement, String tagName, XmlSerializer serializer)
        throws java.io.IOException {
    serializer.startTag(NAMESPACE, tagName);
    flush(serializer);
    StringBuffer b = b(serializer);
    int start = b.length();
    if (ciManagement.getSystem() != null) {
        writeValue(serializer, "system", ciManagement.getSystem(), ciManagement);
    }
    if (ciManagement.getUrl() != null) {
        writeValue(serializer, "url", ciManagement.getUrl(), ciManagement);
    }
    if ((ciManagement.getNotifiers() != null) && (ciManagement.getNotifiers().size() > 0)) {
        serializer.startTag(NAMESPACE, "notifiers");
        for (Iterator iter = ciManagement.getNotifiers().iterator(); iter.hasNext();) {
            Notifier o = (Notifier) iter.next();
            writeNotifier(o, "notifier", serializer);
        }
        serializer.endTag(NAMESPACE, "notifiers");
    }
    serializer.endTag(NAMESPACE, tagName).flush();
    logLocation(ciManagement, "", start, b.length());
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:24,代码来源:LocationAwareMavenXpp3Writer.java

示例2: visitCiManagement

import org.apache.maven.model.CiManagement; //导入依赖的package包/类
private void visitCiManagement( ModelVisitor visitor, CiManagement ciManagement )
{
    List<Notifier> notifiers = ciManagement.getNotifiers();
    if ( notifiers != null )
    {
        ListIterator<Notifier> notifierIterator = notifiers.listIterator();
        while ( notifierIterator.hasNext() )
        {
            Notifier notifier = notifierIterator.next();
            visitor.visitCiManagementNotifier( notifier );
            visitCiManagementNotifier( visitor, notifier );
            notifier = visitor.replaceCiManagementNotifier( notifier );
            if ( notifier == null )
                notifierIterator.remove();
            else
                notifierIterator.set( notifier );
        }
    }
}
 
开发者ID:fedora-java,项目名称:xmvn,代码行数:20,代码来源:DefaultModelProcessor.java

示例3: updateCiManagement

import org.apache.maven.model.CiManagement; //导入依赖的package包/类
/**
 * Method updateCiManagement
 *
 * @param value
 * @param element
 * @param counter
 * @param xmlTag
 */
protected void updateCiManagement( CiManagement 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, "system", value.getSystem(), null );
        findAndReplaceSimpleElement( innerCount, root, "url", value.getUrl(), null );
        iterateNotifier( innerCount, root, value.getNotifiers(), "notifiers", "notifier" );
    }
}
 
开发者ID:javiersigler,项目名称:apache-maven-shade-plugin,代码行数:21,代码来源:MavenJDOMWriter.java

示例4: convertCiManagement

import org.apache.maven.model.CiManagement; //导入依赖的package包/类
private org.apache.archiva.metadata.model.CiManagement convertCiManagement( CiManagement ciManagement )
{
    org.apache.archiva.metadata.model.CiManagement ci = null;
    if ( ciManagement != null )
    {
        ci = new org.apache.archiva.metadata.model.CiManagement();
        ci.setSystem( ciManagement.getSystem() );
        ci.setUrl( ciManagement.getUrl() );
    }
    return ci;
}
 
开发者ID:ruikom,项目名称:apache-archiva,代码行数:12,代码来源:Maven2RepositoryStorage.java

示例5: mergeCiManagement

import org.apache.maven.model.CiManagement; //导入依赖的package包/类
protected void mergeCiManagement( CiManagement target, CiManagement source, boolean sourceDominant,
                                  Map<Object, Object> context )
{
    mergeCiManagement_System( target, source, sourceDominant, context );
    mergeCiManagement_Url( target, source, sourceDominant, context );
    mergeCiManagement_Notifiers( target, source, sourceDominant, context );
}
 
开发者ID:gems-uff,项目名称:oceano,代码行数:8,代码来源:ModelMerger.java

示例6: mergeCiManagement_System

import org.apache.maven.model.CiManagement; //导入依赖的package包/类
protected void mergeCiManagement_System( CiManagement target, CiManagement source, boolean sourceDominant,
                                         Map<Object, Object> context )
{
    String src = source.getSystem();
    if ( src != null )
    {
        if ( sourceDominant || target.getSystem() == null )
        {
            target.setSystem( src );
            target.setLocation( "system", source.getLocation( "system" ) );
        }
    }
}
 
开发者ID:gems-uff,项目名称:oceano,代码行数:14,代码来源:ModelMerger.java

示例7: mergeCiManagement_Url

import org.apache.maven.model.CiManagement; //导入依赖的package包/类
protected void mergeCiManagement_Url( CiManagement target, CiManagement 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" ) );
        }
    }
}
 
开发者ID:gems-uff,项目名称:oceano,代码行数:14,代码来源:ModelMerger.java

示例8: getCiManagement

import org.apache.maven.model.CiManagement; //导入依赖的package包/类
public CiManagement getCiManagement()
{
    return null;
}
 
开发者ID:kefik,项目名称:Pogamut3,代码行数:5,代码来源:DependencyProjectStub.java

示例9: replaceCiManagement

import org.apache.maven.model.CiManagement; //导入依赖的package包/类
@Override
public CiManagement replaceCiManagement( CiManagement ciManagement )
{
    return ciManagement;
}
 
开发者ID:fedora-java,项目名称:xmvn,代码行数:6,代码来源:AbstractModelVisitor.java

示例10: visitCiManagement

import org.apache.maven.model.CiManagement; //导入依赖的package包/类
@Override
public void visitCiManagement( CiManagement ciManagement )
{
}
 
开发者ID:fedora-java,项目名称:xmvn,代码行数:5,代码来源:AbstractModelVisitor.java

示例11: get

import org.apache.maven.model.CiManagement; //导入依赖的package包/类
@Override
public CiManagement get( Model model )
{
    return model.getCiManagement();
}
 
开发者ID:mojohaus,项目名称:flatten-maven-plugin,代码行数:6,代码来源:PomProperty.java

示例12: set

import org.apache.maven.model.CiManagement; //导入依赖的package包/类
@Override
public void set( Model model, CiManagement value )
{
    model.setCiManagement( value );
}
 
开发者ID:mojohaus,项目名称:flatten-maven-plugin,代码行数:6,代码来源:PomProperty.java

示例13: getCiManagement

import org.apache.maven.model.CiManagement; //导入依赖的package包/类
public CiManagement getCiManagement()
{
    return getModel().getCiManagement();
}
 
开发者ID:gems-uff,项目名称:oceano,代码行数:5,代码来源:MavenProject.java

示例14: setCiManagement

import org.apache.maven.model.CiManagement; //导入依赖的package包/类
public void setCiManagement( CiManagement ciManagement )
{
    getModel().setCiManagement( ciManagement );
}
 
开发者ID:gems-uff,项目名称:oceano,代码行数:5,代码来源:MavenProject.java

示例15: setupJenkins

import org.apache.maven.model.CiManagement; //导入依赖的package包/类
/**
 * Attempt to create new jenkins client instance. If credentials are null, attempt to connect without authentication.
 * 
 * @return null on failure
 */
private JenkinsClient setupJenkins(String url, String user, String token, CiManagement ciManagement)
        throws MojoExecutionException
{
    String savedUrl = config.get("jenkinsUrl");
    String savedUser = config.get("jenkinsUser");
    String savedToken = config.get("jenkinsToken");
    if (url == null) {
        if(savedUrl != null) {
            url = savedUrl;
        } else {
            // try to use <ciManagement>
            if(ciManagement != null
                && Pattern.matches(CI_MANAGEMENT_SYSTEM_NAME_PATTERN, ciManagement.getSystem())
                && ciManagement.getUrl() != null)
            {
                url = ciManagement.getUrl();
                log.info("Using Jenkins URL from <ciManagement> settings in POM.");
            } else {
                if(ciManagement != null) {
                    log.warn("<ciManagement> settings found in POM but could not be used "
                           + "because the CI system name does not match '"+ CI_MANAGEMENT_SYSTEM_NAME_PATTERN +"' "
                           + "pattern or the URL is not set.");
                }
            }
        }
    }
    if (user == null)
        user = savedUser;
    if (token == null)
        token = savedToken;

    if (url == null)
        fail("Jenkins URL is a required parameter:\n"
           + "* 'jenkinsUrl' parameter is null.\n"
           + "* There is no suitable <ciManagement> setting in POM.\n"
           + "* There is no saved URL from previous executions.\n"
           + "URL must point to the root of the server.");

    // this is to avoid problems when connecting via https
    System.setProperty("jsse.enableSNIExtension", "false");

    JenkinsClient jc;

    if (user == null || token == null) {
        jc = JenkinsClientFactory.createClient(url, log); // TODO url as argument?
        log.debug("Setting up the jenkins client without authentication.");
    } else {
        jc = JenkinsClientFactory.createClient(url, user, token, log);
        log.debug("Setting up the jenkins client with authentication.");
    }
    if (jc == null) {
        fail("Failed to connect to Jenkins. "
                + "Check if the server is accessible and URL (" + url + ") and credentials" +
                " (user = '" + user + "', token = '" + token + "') are correct.");
    } else {
        log.debug("Saving Jenkins access config.");
        config.put("jenkinsUrl", url);
        config.put("jenkinsUser", user);
        config.put("jenkinsToken", token);
    }
    return jc;
}
 
开发者ID:jsenko,项目名称:jpct-maven-plugin,代码行数:68,代码来源:RunMojo.java


注:本文中的org.apache.maven.model.CiManagement类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。