• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java ModelBase类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: updateModelBase

import org.apache.maven.model.ModelBase; //导入依赖的package包/类
/**
 * Method updateModelBase
 *
 * @param value
 * @param element
 * @param counter
 * @param xmlTag
 */
//CHECKSTYLE_OFF: LineLength
protected void updateModelBase( ModelBase 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 );
        findAndReplaceSimpleLists( innerCount, root, value.getModules(), "modules", "module" );
        iterateRepository( innerCount, root, value.getRepositories(), "repositories", "repository" );
        iterateRepository( innerCount, root, value.getPluginRepositories(), "pluginRepositories",
                           "pluginRepository" );
        iterateDependency( innerCount, root, value.getDependencies(), "dependencies", "dependency" );
        findAndReplaceXpp3DOM( innerCount, root, "reports", (Xpp3Dom) value.getReports() );
        updateReporting( value.getReporting(), "reporting", innerCount, root );
        updateDependencyManagement( value.getDependencyManagement(), "dependencyManagement", innerCount, root );
        updateDistributionManagement( value.getDistributionManagement(), "distributionManagement", innerCount, root );
        findAndReplaceProperties( innerCount, root, "properties", value.getProperties() );
    }
}
 
开发者ID:javiersigler,项目名称:apache-maven-shade-plugin,代码行数:29,代码来源:MavenJDOMWriter.java


示例2: updateModelBase

import org.apache.maven.model.ModelBase; //导入依赖的package包/类
/**
 * Method updateModelBase
 *
 * @param value
 * @param element
 * @param counter
 * @param xmlTag
 */
protected void updateModelBase( ModelBase 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 );
        findAndReplaceSimpleLists( innerCount, root, value.getModules(), "modules", "module" );
        iterateRepository( innerCount, root, value.getRepositories(), "repositories", "repository" );
        iterateRepository( innerCount, root, value.getPluginRepositories(), "pluginRepositories",
                           "pluginRepository" );
        iterateDependency( innerCount, root, value.getDependencies(), "dependencies", "dependency" );
        findAndReplaceXpp3DOM( innerCount, root, "reports", (Xpp3Dom) value.getReports() );
        updateReporting( value.getReporting(), "reporting", innerCount, root );
        updateDependencyManagement( value.getDependencyManagement(), "dependencyManagement", innerCount, root );
        updateDistributionManagement( value.getDistributionManagement(), "distributionManagement", innerCount,
                                      root );
        findAndReplaceProperties( innerCount, root, "properties", value.getProperties() );
    }
}
 
开发者ID:immutables,项目名称:maven-shade-plugin,代码行数:29,代码来源:MavenJDOMWriter.java


示例3: getPluginMap

import org.apache.maven.model.ModelBase; //导入依赖的package包/类
public Map<String, Plugin> getPluginMap( final ModelBase base )
{
    final BuildBase build;
    if ( base instanceof Model )
    {
        build = ( (Model) base ).getBuild();
    }
    else
    {
        build = ( (Profile) base ).getBuild();
    }

    if ( build == null )
    {
        return Collections.emptyMap();
    }

    final Map<String, Plugin> result = build.getPluginsAsMap();
    if ( result == null )
    {
        return Collections.emptyMap();
    }

    return result;
}
 
开发者ID:release-engineering,项目名称:pom-manipulation-ext,代码行数:26,代码来源:Project.java


示例4: findSkipRefs

import org.apache.maven.model.ModelBase; //导入依赖的package包/类
/**
 * Go through the plugin / plugin-execution configurations and find references to the <code>skip</code> parameter for the given Maven plugin
 * (specified by artifactId), both in managed and concrete plugin declarations (where available).
 */
private List<SkipReference> findSkipRefs( final ModelBase base, final String pluginArtifactId, final Project project )
    throws ManipulationException
{
    final String key = ga( MAVEN_PLUGIN_GROUPID, pluginArtifactId );

    final List<SkipReference> result = new ArrayList<>();

    Map<String, Plugin> pluginMap = project.getManagedPluginMap( base );
    Plugin plugin = pluginMap.get( key );
    result.addAll( findSkipRefs( plugin, project ) );

    pluginMap = project.getPluginMap( base );
    plugin = pluginMap.get( key );
    result.addAll( findSkipRefs( plugin, project ) );

    return result;
}
 
开发者ID:release-engineering,项目名称:pom-manipulation-ext,代码行数:22,代码来源:DistributionEnforcingManipulator.java


示例5: mergeModelBase_Properties

import org.apache.maven.model.ModelBase; //导入依赖的package包/类
protected void mergeModelBase_Properties( ModelBase target, ModelBase source, boolean sourceDominant,
                                          Map<Object, Object> context )
{
    Properties merged = new Properties();
    if ( sourceDominant )
    {
        merged.putAll( target.getProperties() );
        merged.putAll( source.getProperties() );
    }
    else
    {
        merged.putAll( source.getProperties() );
        merged.putAll( target.getProperties() );
    }
    target.setProperties( merged );
    target.setLocation( "properties", InputLocation.merge( target.getLocation( "properties" ),
                                                           source.getLocation( "properties" ), sourceDominant ) );
}
 
开发者ID:gems-uff,项目名称:oceano,代码行数:19,代码来源:ModelMerger.java


示例6: scanForSubmodulesIn

import org.apache.maven.model.ModelBase; //导入依赖的package包/类
private static void scanForSubmodulesIn(ModelBase projectOrProfile, File basedir, Set<File> registered) throws IllegalArgumentException {
    for (String module : projectOrProfile.getModules()) {
        if (module == null) {
            //#205690 apparently in some rare scenarios module can be null, I was not able to reproduce myself
            //maven itself checks for null value during validation, but at later stages doesn't always check.
            //additional aspect for consideration is that in this case the value is taken from Model class not MavenProject
            continue;
        }
        registerWithSubmodules(FileUtilities.resolveFilePath(basedir, module), registered);
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:12,代码来源:ProjectOpenedHookImpl.java


示例7: interpolate

import org.apache.maven.model.ModelBase; //导入依赖的package包/类
private static void interpolate(Map<String, String> dict, MavenProject p) {
    if (p == null) {
        return;
    }

    interpolate(dict, p.getParent());
    interpolate(dict, p.getModel());
    for (ModelBase model: p.getActiveProfiles()) {
        interpolate(dict, model);
    }
}
 
开发者ID:trustin,项目名称:os-maven-plugin,代码行数:12,代码来源:DetectExtension.java


示例8: getManagedPluginMap

import org.apache.maven.model.ModelBase; //导入依赖的package包/类
public Map<String, Plugin> getManagedPluginMap( final ModelBase base )
{
    if ( base instanceof Model )
    {
        final Build build = ( (Model) base ).getBuild();
        if ( build == null )
        {
            return Collections.emptyMap();
        }

        final PluginManagement pm = build.getPluginManagement();
        if ( pm == null )
        {
            return Collections.emptyMap();
        }

        final Map<String, Plugin> result = pm.getPluginsAsMap();
        if ( result == null )
        {
            return Collections.emptyMap();
        }

        return result;
    }

    return Collections.emptyMap();
}
 
开发者ID:release-engineering,项目名称:pom-manipulation-ext,代码行数:28,代码来源:Project.java


示例9: mergeModelBase

import org.apache.maven.model.ModelBase; //导入依赖的package包/类
protected void mergeModelBase( ModelBase target, ModelBase source, boolean sourceDominant,
                               Map<Object, Object> context )
{
    mergeModelBase_DistributionManagement( target, source, sourceDominant, context );
    mergeModelBase_Modules( target, source, sourceDominant, context );
    mergeModelBase_Repositories( target, source, sourceDominant, context );
    mergeModelBase_PluginRepositories( target, source, sourceDominant, context );
    mergeModelBase_Dependencies( target, source, sourceDominant, context );
    mergeModelBase_Reporting( target, source, sourceDominant, context );
    mergeModelBase_DependencyManagement( target, source, sourceDominant, context );
    mergeModelBase_Properties( target, source, sourceDominant, context );
}
 
开发者ID:gems-uff,项目名称:oceano,代码行数:13,代码来源:ModelMerger.java


示例10: mergeModelBase_Modules

import org.apache.maven.model.ModelBase; //导入依赖的package包/类
protected void mergeModelBase_Modules( ModelBase target, ModelBase source, boolean sourceDominant,
                                       Map<Object, Object> context )
{
    List<String> src = source.getModules();
    if ( !src.isEmpty() )
    {
        List<String> tgt = target.getModules();
        List<String> merged = new ArrayList<String>( tgt.size() + src.size() );
        merged.addAll( tgt );
        merged.addAll( src );
        target.setModules( merged );
    }
}
 
开发者ID:gems-uff,项目名称:oceano,代码行数:14,代码来源:ModelMerger.java


示例11: mergeModelBase_Modules

import org.apache.maven.model.ModelBase; //导入依赖的package包/类
@Override
protected void mergeModelBase_Modules( ModelBase target, ModelBase source, boolean sourceDominant,
                                       Map<Object, Object> context )
{
    List<String> src = source.getModules();
    if ( !src.isEmpty() && sourceDominant )
    {
        List<Integer> indices = new ArrayList<Integer>();
        List<String> tgt = target.getModules();
        Set<String> excludes = new LinkedHashSet<String>( tgt );
        List<String> merged = new ArrayList<String>( tgt.size() + src.size() );
        merged.addAll( tgt );
        for ( int i = 0, n = tgt.size(); i < n; i++ )
        {
            indices.add( Integer.valueOf( i ) );
        }
        for ( int i = 0, n = src.size(); i < n; i++ )
        {
            String s = src.get( i );
            if ( !excludes.contains( s ) )
            {
                merged.add( s );
                indices.add( Integer.valueOf( ~i ) );
            }
        }
        target.setModules( merged );
        target.setLocation( "modules", InputLocation.merge( target.getLocation( "modules" ),
                                                            source.getLocation( "modules" ), indices ) );
    }
}
 
开发者ID:gems-uff,项目名称:oceano,代码行数:31,代码来源:MavenModelMerger.java


示例12: mergeModelBase

import org.apache.maven.model.ModelBase; //导入依赖的package包/类
public void mergeModelBase( ModelBase target, ModelBase source )
{
    mergeModelBase( target, source, true, Collections.emptyMap() );
}
 
开发者ID:gems-uff,项目名称:oceano,代码行数:5,代码来源:DefaultProfileInjector.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java PostgresFullPrunedBlockStore类代码示例发布时间:2022-05-22
下一篇:
Java ObjectBidirectionalIterator类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap