當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。