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