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


Java ModelBase.getModules方法代码示例

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


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

示例1: 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

示例2: 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

示例3: 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


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