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


Java Prerequisites类代码示例

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


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

示例1: getRequiredMavenVersion

import org.apache.maven.model.Prerequisites; //导入依赖的package包/类
private String getRequiredMavenVersion( MavenProject mavenProject, String defaultValue )
{
    ArtifactVersion requiredMavenVersion = null;
    while ( mavenProject != null )
    {
        final Prerequisites prerequisites = mavenProject.getPrerequisites();
        final String mavenVersion = prerequisites == null ? null : prerequisites.getMaven();
        if ( mavenVersion != null )
        {
            final ArtifactVersion v = new DefaultArtifactVersion( mavenVersion );
            if ( requiredMavenVersion == null || requiredMavenVersion.compareTo( v ) < 0 )
            {
                requiredMavenVersion = v;
            }
        }
        mavenProject = mavenProject.getParent();
    }
    return requiredMavenVersion == null ? defaultValue : requiredMavenVersion.toString();
}
 
开发者ID:mojohaus,项目名称:versions-maven-plugin,代码行数:20,代码来源:DisplayPluginUpdatesMojo.java

示例2: writePrerequisites

import org.apache.maven.model.Prerequisites; //导入依赖的package包/类
private void writePrerequisites(Prerequisites prerequisites, String tagName, XmlSerializer serializer)
        throws java.io.IOException {
    serializer.startTag(NAMESPACE, tagName);
    flush(serializer);
    StringBuffer b = b(serializer);
    int start = b.length();
    if ((prerequisites.getMaven() != null) && !prerequisites.getMaven().equals("2.0")) {
        writeValue(serializer, "maven", prerequisites.getMaven(), prerequisites);
    }
    serializer.endTag(NAMESPACE, tagName).flush();
    logLocation(prerequisites, "", start, b.length());
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:13,代码来源:LocationAwareMavenXpp3Writer.java

示例3: updatePrerequisites

import org.apache.maven.model.Prerequisites; //导入依赖的package包/类
/**
 * Method updatePrerequisites
 *
 * @param value
 * @param element
 * @param counter
 * @param xmlTag
 */
protected void updatePrerequisites( Prerequisites 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, "maven", value.getMaven(), "2.0" );
    }
}
 
开发者ID:javiersigler,项目名称:apache-maven-shade-plugin,代码行数:19,代码来源:MavenJDOMWriter.java

示例4: mergePrerequisites_Maven

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

示例5: guessBestMaven

import org.apache.maven.model.Prerequisites; //导入依赖的package包/类
private File guessBestMaven(RunConfig clonedConfig, InputOutput ioput) {
    MavenProject mp = clonedConfig.getMavenProject();
    if (mp != null) {
        if (mp.getPrerequisites() != null) {
            Prerequisites pp = mp.getPrerequisites();
            String ver = pp.getMaven();
            if (ver != null) {
                return checkAvailability(ver, null, ioput);
            }
        }
        String value = PluginPropertyUtils.getPluginPropertyBuildable(clonedConfig.getMavenProject(), Constants.GROUP_APACHE_PLUGINS, "maven-enforcer-plugin", "enforce", new PluginPropertyUtils.ConfigurationBuilder<String>() {
            @Override
            public String build(Xpp3Dom configRoot, ExpressionEvaluator eval) {
                if(configRoot != null) {
                    Xpp3Dom rules = configRoot.getChild("rules");
                    if (rules != null) {
                        Xpp3Dom rmv = rules.getChild("requireMavenVersion");
                        if (rmv != null) {
                            Xpp3Dom v = rmv.getChild("version");
                            if (v != null) {
                                return v.getValue();
                            }
                        }
                    }
                }
                return null;
            }
        });
        if (value != null) {
            if (value.contains("[") || value.contains("(")) {
                try {
                    VersionRange vr = VersionRange.createFromVersionSpec(value);
                    return checkAvailability(null, vr, ioput);
                } catch (InvalidVersionSpecificationException ex) {
                    Exceptions.printStackTrace(ex);
                }
            } else {
                return checkAvailability(value, null, ioput);
            }
        }
    }
    return null;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:44,代码来源:MavenCommandLineExecutor.java

示例6: getPrerequisites

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

示例7: replacePrerequisite

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

示例8: visitPrerequisite

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

示例9: get

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

示例10: set

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

示例11: getPrerequisites

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

示例12: mergePrerequisites

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

示例13: getPrerequisites

import org.apache.maven.model.Prerequisites; //导入依赖的package包/类
@Override
public Prerequisites getPrerequisites() {
	return getDelegate().getPrerequisites();
}
 
开发者ID:jwrapper,项目名称:jwrapper-maven-plugin,代码行数:5,代码来源:MavenProjectDelegate.java

示例14: replacePrerequisite

import org.apache.maven.model.Prerequisites; //导入依赖的package包/类
Prerequisites replacePrerequisite( Prerequisites prerequisites ); 
开发者ID:fedora-java,项目名称:xmvn,代码行数:2,代码来源:ModelVisitor.java

示例15: visitPrerequisite

import org.apache.maven.model.Prerequisites; //导入依赖的package包/类
void visitPrerequisite( Prerequisites prerequisites ); 
开发者ID:fedora-java,项目名称:xmvn,代码行数:2,代码来源:ModelVisitor.java


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