本文整理汇总了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;
}
示例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);
}
示例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;
}