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


Java ComponentDependency类代码示例

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


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

示例1: patchedClone

import org.codehaus.plexus.component.repository.ComponentDependency; //导入依赖的package包/类
private static PluginDescriptor patchedClone(PluginDescriptor pluginDescriptor) {
  if (pluginDescriptor == null) return null;

  PluginDescriptor clone = clone(pluginDescriptor);
  clone.setDependencies(new ArrayList<ComponentDependency>(pluginDescriptor.getDependencies()));

  return clone;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:CustomPluginDescriptorCache.java

示例2: toComponentDependencies

import org.codehaus.plexus.component.repository.ComponentDependency; //导入依赖的package包/类
private static List<ComponentDependency>  toComponentDependencies(List<Dependency>   dependencies)
{
    //return PluginUtils.toComponentDependencies( dependencies )
    return GeneratorUtils.toComponentDependencies(dependencies);
}
 
开发者ID:bsorrentino,项目名称:maven-confluence-plugin,代码行数:6,代码来源:ConfluenceDeployMojo.java

示例3: build

import org.codehaus.plexus.component.repository.ComponentDependency; //导入依赖的package包/类
public PluginDescriptor build( Reader reader, String source )
    throws PlexusConfigurationException
{
    PlexusConfiguration c = buildConfiguration( reader );

    PluginDescriptor pluginDescriptor = new PluginDescriptor();

    pluginDescriptor.setSource( source );
    pluginDescriptor.setGroupId( c.getChild( "groupId" ).getValue() );
    pluginDescriptor.setArtifactId( c.getChild( "artifactId" ).getValue() );
    pluginDescriptor.setVersion( c.getChild( "version" ).getValue() );
    pluginDescriptor.setGoalPrefix( c.getChild( "goalPrefix" ).getValue() );

    pluginDescriptor.setName( c.getChild( "name" ).getValue() );
    pluginDescriptor.setDescription( c.getChild( "description" ).getValue() );

    String isolatedRealm = c.getChild( "isolatedRealm" ).getValue();

    if ( isolatedRealm != null )
    {
        pluginDescriptor.setIsolatedRealm( Boolean.parseBoolean( isolatedRealm ) );
    }

    String inheritedByDefault = c.getChild( "inheritedByDefault" ).getValue();

    if ( inheritedByDefault != null )
    {
        pluginDescriptor.setInheritedByDefault( Boolean.parseBoolean( inheritedByDefault ) );
    }

    // ----------------------------------------------------------------------
    // Components
    // ----------------------------------------------------------------------

    PlexusConfiguration[] mojoConfigurations = c.getChild( "mojos" ).getChildren( "mojo" );

    for ( PlexusConfiguration component : mojoConfigurations )
    {
        MojoDescriptor mojoDescriptor = buildComponentDescriptor( component, pluginDescriptor );

        pluginDescriptor.addMojo( mojoDescriptor );
    }

    // ----------------------------------------------------------------------
    // Dependencies
    // ----------------------------------------------------------------------

    PlexusConfiguration[] dependencyConfigurations = c.getChild( "dependencies" ).getChildren( "dependency" );

    List<ComponentDependency> dependencies = new ArrayList<ComponentDependency>();

    for ( PlexusConfiguration d : dependencyConfigurations )
    {
        ComponentDependency cd = new ComponentDependency();

        cd.setArtifactId( d.getChild( "artifactId" ).getValue() );

        cd.setGroupId( d.getChild( "groupId" ).getValue() );

        cd.setType( d.getChild( "type" ).getValue() );

        cd.setVersion( d.getChild( "version" ).getValue() );

        dependencies.add( cd );
    }

    pluginDescriptor.setDependencies( dependencies );

    return pluginDescriptor;
}
 
开发者ID:gems-uff,项目名称:oceano,代码行数:71,代码来源:PluginDescriptorBuilder.java


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