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


Java Plugin.getDependencies方法代码示例

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


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

示例1: addPluginArtifacts

import org.apache.maven.model.Plugin; //导入方法依赖的package包/类
private void addPluginArtifacts( final Set<Artifact> artifacts ) {
   final Map<String, Artifact> dependencyArtifactMap = this.pluginDescriptor.getArtifactMap();
   // We should always have FitNesse itself on the FitNesse classpath!
   artifacts.addAll( resolveDependencyKey( FitNesseMavenCoordinate.artifactKey, dependencyArtifactMap ) );

   // We check plugin for null to allow use in standalone mode
   final Plugin fitnessePlugin = this.project.getPlugin( this.pluginDescriptor.getPluginLookupKey() );
   if( fitnessePlugin == null ){
      getLog().info( "Running standalone - launching vanilla FitNesse" );
   }else{
      final List<Dependency> dependecies = fitnessePlugin.getDependencies();
      if( dependecies != null && !dependecies.isEmpty() ){
         getLog().info( "Using dependencies specified in plugin config" );
         for( Dependency dependency : dependecies ){
            final String key = dependency.getGroupId() + ":" + dependency.getArtifactId();
            artifacts.addAll( resolveDependencyKey( key, dependencyArtifactMap ) );
         }
      }
   }
}
 
开发者ID:ZsZs,项目名称:FitNesseLauncher,代码行数:21,代码来源:AbstractFitNesseMojo.java

示例2: extractPluginDependenciesFromPluginsInPluginManagement

import org.apache.maven.model.Plugin; //导入方法依赖的package包/类
private static Set<Dependency> extractPluginDependenciesFromPluginsInPluginManagement( Build build )
{
    Set<Dependency> result = new TreeSet<>( new DependencyComparator() );
    if ( build.getPluginManagement() != null )
    {
        for ( Plugin plugin : build.getPluginManagement().getPlugins() )
        {
            if ( plugin.getDependencies() != null && !plugin.getDependencies().isEmpty() )
            {
                for ( Dependency pluginDependency : plugin.getDependencies() )
                {
                    result.add( pluginDependency );
                }
            }
        }
    }
    return result;
}
 
开发者ID:mojohaus,项目名称:versions-maven-plugin,代码行数:19,代码来源:DisplayDependencyUpdatesMojo.java

示例3: visitBuildPlugin

import org.apache.maven.model.Plugin; //导入方法依赖的package包/类
private void visitBuildPlugin( ModelVisitor visitor, Plugin plugin )
{
    List<PluginExecution> executions = plugin.getExecutions();
    if ( executions != null )
    {
        ListIterator<PluginExecution> executionIterator = executions.listIterator();
        while ( executionIterator.hasNext() )
        {
            PluginExecution execution = executionIterator.next();
            visitor.visitBuildPluginExecution( execution );
            visitBuildPluginExecution( visitor, execution );
            execution = visitor.replaceBuildPluginExecution( execution );
            if ( execution == null )
                executionIterator.remove();
            else
                executionIterator.set( execution );
        }
    }

    List<Dependency> dependencies = plugin.getDependencies();
    if ( dependencies != null )
    {
        ListIterator<Dependency> dependencyIterator = dependencies.listIterator();
        while ( dependencyIterator.hasNext() )
        {
            Dependency dependency = dependencyIterator.next();
            visitor.visitBuildPluginDependency( dependency );
            visitBuildPluginDependency( visitor, dependency );
            dependency = visitor.replaceBuildPluginDependency( dependency );
            if ( dependency == null )
                dependencyIterator.remove();
            else
                dependencyIterator.set( dependency );
        }
    }
}
 
开发者ID:fedora-java,项目名称:xmvn,代码行数:37,代码来源:DefaultModelProcessor.java

示例4: visitBuildPluginManagementPlugin

import org.apache.maven.model.Plugin; //导入方法依赖的package包/类
private void visitBuildPluginManagementPlugin( ModelVisitor visitor, Plugin plugin )
{
    List<PluginExecution> executions = plugin.getExecutions();
    if ( executions != null )
    {
        ListIterator<PluginExecution> executionIterator = executions.listIterator();
        while ( executionIterator.hasNext() )
        {
            PluginExecution execution = executionIterator.next();
            visitor.visitBuildPluginManagementPluginExecution( execution );
            visitBuildPluginManagementPluginExecution( visitor, execution );
            execution = visitor.replaceBuildPluginManagementPluginExecution( execution );
            if ( execution == null )
                executionIterator.remove();
            else
                executionIterator.set( execution );
        }
    }

    List<Dependency> dependencies = plugin.getDependencies();
    if ( dependencies != null )
    {
        ListIterator<Dependency> dependencyIterator = dependencies.listIterator();
        while ( dependencyIterator.hasNext() )
        {
            Dependency dependency = dependencyIterator.next();
            visitor.visitBuildPluginManagementPluginDependency( dependency );
            visitBuildPluginManagementPluginDependency( visitor, dependency );
            dependency = visitor.replaceBuildPluginManagementPluginDependency( dependency );
            if ( dependency == null )
                dependencyIterator.remove();
            else
                dependencyIterator.set( dependency );
        }
    }
}
 
开发者ID:fedora-java,项目名称:xmvn,代码行数:37,代码来源:DefaultModelProcessor.java

示例5: visitProfileBuildPlugin

import org.apache.maven.model.Plugin; //导入方法依赖的package包/类
private void visitProfileBuildPlugin( ModelVisitor visitor, Plugin plugin )
{
    List<PluginExecution> executions = plugin.getExecutions();
    if ( executions != null )
    {
        ListIterator<PluginExecution> executionIterator = executions.listIterator();
        while ( executionIterator.hasNext() )
        {
            PluginExecution execution = executionIterator.next();
            visitor.visitProfileBuildPluginExecution( execution );
            visitProfileBuildPluginExecution( visitor, execution );
            execution = visitor.replaceProfileBuildPluginExecution( execution );
            if ( execution == null )
                executionIterator.remove();
            else
                executionIterator.set( execution );
        }
    }

    List<Dependency> dependencies = plugin.getDependencies();
    if ( dependencies != null )
    {
        ListIterator<Dependency> dependencyIterator = dependencies.listIterator();
        while ( dependencyIterator.hasNext() )
        {
            Dependency dependency = dependencyIterator.next();
            visitor.visitProfileBuildPluginDependency( dependency );
            visitProfileBuildPluginDependency( visitor, dependency );
            dependency = visitor.replaceProfileBuildPluginDependency( dependency );
            if ( dependency == null )
                dependencyIterator.remove();
            else
                dependencyIterator.set( dependency );
        }
    }
}
 
开发者ID:fedora-java,项目名称:xmvn,代码行数:37,代码来源:DefaultModelProcessor.java

示例6: visitProfileBuildPluginManagementPlugin

import org.apache.maven.model.Plugin; //导入方法依赖的package包/类
private void visitProfileBuildPluginManagementPlugin( ModelVisitor visitor, Plugin plugin )
{
    List<PluginExecution> executions = plugin.getExecutions();
    if ( executions != null )
    {
        ListIterator<PluginExecution> executionIterator = executions.listIterator();
        while ( executionIterator.hasNext() )
        {
            PluginExecution execution = executionIterator.next();
            visitor.visitProfileBuildPluginManagementPluginExecution( execution );
            visitProfileBuildPluginManagementPluginExecution( visitor, execution );
            execution = visitor.replaceProfileBuildPluginManagementPluginExecution( execution );
            if ( execution == null )
                executionIterator.remove();
            else
                executionIterator.set( execution );
        }
    }

    List<Dependency> dependencies = plugin.getDependencies();
    if ( dependencies != null )
    {
        ListIterator<Dependency> dependencyIterator = dependencies.listIterator();
        while ( dependencyIterator.hasNext() )
        {
            Dependency dependency = dependencyIterator.next();
            visitor.visitProfileBuildPluginManagementPluginDependency( dependency );
            visitProfileBuildPluginManagementPluginDependency( visitor, dependency );
            dependency = visitor.replaceProfileBuildPluginManagementPluginDependency( dependency );
            if ( dependency == null )
                dependencyIterator.remove();
            else
                dependencyIterator.set( dependency );
        }
    }
}
 
开发者ID:fedora-java,项目名称:xmvn,代码行数:37,代码来源:DefaultModelProcessor.java

示例7: lookupPluginUpdates

import org.apache.maven.model.Plugin; //导入方法依赖的package包/类
/**
 * {@inheritDoc}
 */
public PluginUpdatesDetails lookupPluginUpdates( Plugin plugin, boolean allowSnapshots )
    throws ArtifactMetadataRetrievalException, InvalidVersionSpecificationException
{
    String version = plugin.getVersion();
    version = version == null ? "LATEST" : version;
    getLog().debug( "Checking " + ArtifactUtils.versionlessKey( plugin.getGroupId(), plugin.getArtifactId() )
        + " for updates newer than " + version );

    VersionRange versionRange = VersionRange.createFromVersion( version );

    final boolean includeSnapshots = allowSnapshots;

    final ArtifactVersions pluginArtifactVersions =
        lookupArtifactVersions( createPluginArtifact( plugin.getGroupId(), plugin.getArtifactId(), versionRange ),
                                true );

    Set<Dependency> pluginDependencies = new TreeSet<Dependency>( new DependencyComparator() );
    if ( plugin.getDependencies() != null )
    {
        pluginDependencies.addAll( plugin.getDependencies() );
    }
    Map<Dependency, ArtifactVersions> pluginDependencyDetails =
        lookupDependenciesUpdates( pluginDependencies, false );

    return new PluginUpdatesDetails( pluginArtifactVersions, pluginDependencyDetails, includeSnapshots );
}
 
开发者ID:mojohaus,项目名称:versions-maven-plugin,代码行数:30,代码来源:DefaultVersionsHelper.java

示例8: extractDependenciesFromPlugins

import org.apache.maven.model.Plugin; //导入方法依赖的package包/类
private static Set<Dependency> extractDependenciesFromPlugins( List<Plugin> plugins )
{
    Set<Dependency> result = new TreeSet<>( new DependencyComparator() );
    for ( Plugin plugin : plugins )
    {
        if ( plugin.getDependencies() != null && !plugin.getDependencies().isEmpty() )
        {
            for ( Dependency pluginDependency : plugin.getDependencies() )
            {
                result.add( pluginDependency );
            }
        }
    }
    return result;
}
 
开发者ID:mojohaus,项目名称:versions-maven-plugin,代码行数:16,代码来源:DisplayDependencyUpdatesMojo.java

示例9: lookupPluginUpdates

import org.apache.maven.model.Plugin; //导入方法依赖的package包/类
/**
 * {@inheritDoc}
 */
public PluginUpdatesDetails lookupPluginUpdates( Plugin plugin, Boolean allowSnapshots )
    throws ArtifactMetadataRetrievalException, InvalidVersionSpecificationException
{
    String version = plugin.getVersion();
    version = version == null ? "LATEST" : version;
    getLog().debug( "Checking " + ArtifactUtils.versionlessKey( plugin.getGroupId(), plugin.getArtifactId() ) +
                        " for updates newer than " + version );

    VersionRange versionRange = VersionRange.createFromVersion( version );

    final boolean includeSnapshots = Boolean.TRUE.equals( allowSnapshots );

    final ArtifactVersions pluginArtifactVersions =
        lookupArtifactVersions( createPluginArtifact( plugin.getGroupId(), plugin.getArtifactId(), versionRange ),
                                true );

    Set<Dependency> pluginDependencies = new TreeSet<Dependency>( new DependencyComparator() );
    if ( plugin.getDependencies() != null )
    {
        pluginDependencies.addAll( plugin.getDependencies() );
    }
    Map<Dependency, ArtifactVersions> pluginDependencyDetails =
        lookupDependenciesUpdates( pluginDependencies, false );

    return new PluginUpdatesDetails( pluginArtifactVersions, pluginDependencyDetails, includeSnapshots );
}
 
开发者ID:petr-ujezdsky,项目名称:versions-maven-plugin-svn-clone,代码行数:30,代码来源:DefaultVersionsHelper.java


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