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


Java PluginNotFoundException类代码示例

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


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

示例1: setupArtifact

import org.apache.maven.plugin.PluginNotFoundException; //导入依赖的package包/类
@SuppressWarnings( "unchecked" )
void setupArtifact( String groupId, String artifactId, String goal, String type )
      throws DuplicateMojoDescriptorException, PluginNotFoundException, PluginResolutionException, PluginDescriptorParsingException, InvalidPluginDescriptorException {

   DefaultArtifact artifact = new DefaultArtifact( groupId, artifactId, "DUMMY", "compile", type, "", null );
   MojoDescriptor mojoDescriptor = new MojoDescriptor();
   mojoDescriptor.setGoal( goal );
   PluginDescriptor pluginDescriptor = new PluginDescriptor();
   pluginDescriptor.addMojo( mojoDescriptor );

   Plugin plugin = new Plugin();
   plugin.setGroupId( groupId );
   plugin.setArtifactId( artifactId );

   when( this.mojo.pluginManager.loadPlugin( eq( plugin ), anyList(), any( RepositorySystemSession.class ) ) ).thenReturn( pluginDescriptor );

   this.mojo.pluginDescriptor.getArtifactMap().put( String.format( "%s:%s", groupId, artifactId ), artifact );
}
 
开发者ID:ZsZs,项目名称:FitNesseLauncher,代码行数:19,代码来源:SetupsMojoTestHelper.java

示例2: calculateTaskSegments

import org.apache.maven.plugin.PluginNotFoundException; //导入依赖的package包/类
public List<TaskSegment> calculateTaskSegments( MavenSession session )
    throws PluginNotFoundException, PluginResolutionException, PluginDescriptorParsingException,
    MojoNotFoundException, NoPluginFoundForPrefixException, InvalidPluginDescriptorException,
    PluginVersionResolutionException, LifecyclePhaseNotFoundException, LifecycleNotFoundException
{

    MavenProject rootProject = session.getTopLevelProject();

    List<String> tasks = session.getGoals();

    if ( tasks == null || tasks.isEmpty() )
    {
        if ( !StringUtils.isEmpty( rootProject.getDefaultGoal() ) )
        {
            tasks = Arrays.asList( StringUtils.split( rootProject.getDefaultGoal() ) );
        }
    }

    return calculateTaskSegments( session, tasks );
}
 
开发者ID:gems-uff,项目名称:oceano,代码行数:21,代码来源:DefaultLifecycleTaskSegmentCalculator.java

示例3: calculateExecutionPlan

import org.apache.maven.plugin.PluginNotFoundException; //导入依赖的package包/类
public MavenExecutionPlan calculateExecutionPlan( MavenSession session, MavenProject project, List<Object> tasks, boolean setup )
    throws PluginNotFoundException, PluginResolutionException, LifecyclePhaseNotFoundException,
    PluginDescriptorParsingException, MojoNotFoundException, InvalidPluginDescriptorException,
    NoPluginFoundForPrefixException, LifecycleNotFoundException, PluginVersionResolutionException
{
    lifecyclePluginResolver.resolveMissingPluginVersions( project, session );

    final List<MojoExecution> executions = calculateMojoExecutions( session, project, tasks );

    if ( setup )
    {
        setupMojoExecutions( session, project, executions );
    }

    final List<ExecutionPlanItem> planItem = defaultSchedules.createExecutionPlanItem( project, executions );

    return new MavenExecutionPlan( planItem, defaultLifeCycles );
}
 
开发者ID:gems-uff,项目名称:oceano,代码行数:19,代码来源:DefaultLifecycleExecutionPlanCalculator.java

示例4: setupMojoExecution

import org.apache.maven.plugin.PluginNotFoundException; //导入依赖的package包/类
public void setupMojoExecution( MavenSession session, MavenProject project, MojoExecution mojoExecution )
    throws PluginNotFoundException, PluginResolutionException, PluginDescriptorParsingException,
    MojoNotFoundException, InvalidPluginDescriptorException, NoPluginFoundForPrefixException,
    LifecyclePhaseNotFoundException, LifecycleNotFoundException, PluginVersionResolutionException
{
    MojoDescriptor mojoDescriptor = mojoExecution.getMojoDescriptor();

    if ( mojoDescriptor == null )
    {
        mojoDescriptor =
            pluginManager.getMojoDescriptor( mojoExecution.getPlugin(), mojoExecution.getGoal(),
                                             project.getRemotePluginRepositories(),
                                             session.getRepositorySession() );

        mojoExecution.setMojoDescriptor( mojoDescriptor );
    }

    populateMojoExecutionConfiguration( project, mojoExecution,
                                        MojoExecution.Source.CLI.equals( mojoExecution.getSource() ) );

    finalizeMojoConfiguration( mojoExecution );

    calculateForkedExecutions( mojoExecution, session, project, new HashSet<MojoDescriptor>() );
}
 
开发者ID:gems-uff,项目名称:oceano,代码行数:25,代码来源:DefaultLifecycleExecutionPlanCalculator.java

示例5: calculateExecutionPlan

import org.apache.maven.plugin.PluginNotFoundException; //导入依赖的package包/类
@SuppressWarnings( { "UnusedDeclaration" } )
public MavenExecutionPlan calculateExecutionPlan( MavenSession session, boolean setup, String... tasks )
    throws PluginNotFoundException, PluginResolutionException, PluginDescriptorParsingException,
    MojoNotFoundException, NoPluginFoundForPrefixException, InvalidPluginDescriptorException,
    PluginManagerException, LifecyclePhaseNotFoundException, LifecycleNotFoundException,
    PluginVersionResolutionException
{
    List<TaskSegment> taskSegments =
        lifecycleTaskSegmentCalculator.calculateTaskSegments( session, Arrays.asList( tasks ) );

    TaskSegment mergedSegment = new TaskSegment( false );

    for ( TaskSegment taskSegment : taskSegments )
    {
        mergedSegment.getTasks().addAll( taskSegment.getTasks() );
    }

    return lifecycleExecutionPlanCalculator.calculateExecutionPlan( session, session.getCurrentProject(),
                                                                    mergedSegment.getTasks(), setup );
}
 
开发者ID:gems-uff,项目名称:oceano,代码行数:21,代码来源:DefaultLifecycleExecutor.java

示例6: loadPluginFully

import org.apache.maven.plugin.PluginNotFoundException; //导入依赖的package包/类
public PluginDescriptor loadPluginFully( Plugin plugin, MavenProject project, MavenSession session )
    throws ArtifactResolutionException, PluginVersionResolutionException, ArtifactNotFoundException,
    InvalidVersionSpecificationException, InvalidPluginException, PluginManagerException, PluginNotFoundException,
    PluginVersionNotFoundException
{
    PluginDescriptor pluginDescriptor = loadPluginDescriptor( plugin, project, session );

    try
    {
        pluginManager.setupPluginRealm( pluginDescriptor, session, null, null, null );
    }
    catch ( PluginResolutionException e )
    {
        throw new PluginManagerException( plugin, e.getMessage(), e );
    }

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

示例7: testConcurrencyGraphDifferentCompletionOrder

import org.apache.maven.plugin.PluginNotFoundException; //导入依赖的package包/类
public void testConcurrencyGraphDifferentCompletionOrder()
    throws InvalidPluginDescriptorException, PluginVersionResolutionException, PluginDescriptorParsingException,
    NoPluginFoundForPrefixException, MojoNotFoundException, PluginNotFoundException, PluginResolutionException,
    LifecyclePhaseNotFoundException, LifecycleNotFoundException
{
    ProjectDependencyGraph dependencyGraph = new ProjectDependencyGraphStub();
    final MavenSession session = ProjectDependencyGraphStub.getMavenSession();
    ConcurrencyDependencyGraph graph =
        new ConcurrencyDependencyGraph( getProjectBuildList( session ), dependencyGraph );

    graph.markAsFinished( A );
    final List<MavenProject> cDescendants = graph.markAsFinished( C );
    assertEquals( 1, cDescendants.size() );
    assertEquals( Z, cDescendants.get( 0 ) );

    final List<MavenProject> bDescendants = graph.markAsFinished( B );
    assertEquals( 2, bDescendants.size() );
    assertEquals( X, bDescendants.get( 0 ) );
    assertEquals( Y, bDescendants.get( 1 ) );
}
 
开发者ID:gems-uff,项目名称:oceano,代码行数:21,代码来源:ConcurrencyDependencyGraphTest.java

示例8: getProjectBuilds

import org.apache.maven.plugin.PluginNotFoundException; //导入依赖的package包/类
public static List<ProjectSegment> getProjectBuilds( MavenSession session )
    throws InvalidPluginDescriptorException, PluginVersionResolutionException, PluginDescriptorParsingException,
    NoPluginFoundForPrefixException, PluginNotFoundException, MojoNotFoundException, PluginResolutionException,
    LifecyclePhaseNotFoundException, LifecycleNotFoundException
{
    List<ProjectSegment> projectBuilds = new ArrayList<ProjectSegment>();

    TaskSegment segment = createTaskSegment();
    projectBuilds.add( createProjectBuild( A, session, segment ) );
    projectBuilds.add( createProjectBuild( B, session, segment ) );
    projectBuilds.add( createProjectBuild( C, session, segment ) );
    projectBuilds.add( createProjectBuild( X, session, segment ) );
    projectBuilds.add( createProjectBuild( Y, session, segment ) );
    projectBuilds.add( createProjectBuild( Z, session, segment ) );
    return projectBuilds;
}
 
开发者ID:gems-uff,项目名称:oceano,代码行数:17,代码来源:ProjectDependencyGraphStub.java

示例9: calculateExecutionPlan

import org.apache.maven.plugin.PluginNotFoundException; //导入依赖的package包/类
public MavenExecutionPlan calculateExecutionPlan( MavenSession session, MavenProject project, List<Object> tasks,
                                                  boolean setup )
    throws PluginNotFoundException, PluginResolutionException, LifecyclePhaseNotFoundException,
    PluginDescriptorParsingException, MojoNotFoundException, InvalidPluginDescriptorException,
    NoPluginFoundForPrefixException, LifecycleNotFoundException, PluginVersionResolutionException
{
    if ( project.equals( ProjectDependencyGraphStub.A ) )
    {
        return getProjectAExceutionPlan();
    }
    if ( project.equals( ProjectDependencyGraphStub.B ) )
    {
        return getProjectBExecutionPlan();
    }
    // The remaining are basically "for future expansion"
    List<MojoExecution> me = new ArrayList<MojoExecution>();
    me.add( createMojoExecution( "resources", "default-resources", PROCESS_RESOURCES ) );
    me.add( createMojoExecution( "compile", "default-compile", COMPILE ) );
    return createExecutionPlan( project, me );
}
 
开发者ID:gems-uff,项目名称:oceano,代码行数:21,代码来源:LifecycleExecutionPlanCalculatorStub.java

示例10: getProjectAExceutionPlan

import org.apache.maven.plugin.PluginNotFoundException; //导入依赖的package包/类
public static MavenExecutionPlan getProjectAExceutionPlan()
    throws PluginNotFoundException, PluginResolutionException, LifecyclePhaseNotFoundException,
    PluginDescriptorParsingException, MojoNotFoundException, InvalidPluginDescriptorException,
    NoPluginFoundForPrefixException, LifecycleNotFoundException, PluginVersionResolutionException
{
    List<MojoExecution> me = new ArrayList<MojoExecution>();
    me.add( createMojoExecution( "initialize", "default-initialize", INITIALIZE ) );
    me.add( createMojoExecution( "resources", "default-resources", PROCESS_RESOURCES ) );
    me.add( createMojoExecution( "compile", "default-compile", COMPILE ) );
    me.add( createMojoExecution( "testResources", "default-testResources", PROCESS_TEST_RESOURCES ) );
    me.add( createMojoExecution( "testCompile", "default-testCompile", TEST_COMPILE ) );
    me.add( createMojoExecution( "test", "default-test", TEST ) );
    me.add( createMojoExecution( "war", "default-war", PACKAGE ) );
    me.add( createMojoExecution( "install", "default-install", INSTALL ) );
    return createExecutionPlan( ProjectDependencyGraphStub.A.getExecutionProject(), me );
}
 
开发者ID:gems-uff,项目名称:oceano,代码行数:17,代码来源:LifecycleExecutionPlanCalculatorStub.java

示例11: startProject

import org.apache.maven.plugin.PluginNotFoundException; //导入依赖的package包/类
@SuppressWarnings("unchecked")
protected void startProject(MavenProject project, String executionId, XmlPlexusConfiguration process) throws InvalidPluginDescriptorException, PluginResolutionException, PluginDescriptorParsingException, PluginNotFoundException, PluginConfigurationException, MojoFailureException, MojoExecutionException, PluginManagerException {
    Plugin plugin = this.project.getPlugin("org.wildfly.swarm:wildfly-swarm-plugin");

    Xpp3Dom config = getConfiguration(project, executionId);
    Xpp3Dom processConfig = getProcessConfiguration(process);

    Xpp3Dom globalConfig = getGlobalConfig();
    Xpp3Dom mergedConfig = Xpp3DomUtils.mergeXpp3Dom(processConfig, config);
    mergedConfig = Xpp3DomUtils.mergeXpp3Dom(mergedConfig, globalConfig);

    PluginDescriptor pluginDescriptor = this.pluginManager.loadPlugin(plugin, project.getRemotePluginRepositories(), this.repositorySystemSession);
    MojoDescriptor mojoDescriptor = pluginDescriptor.getMojo("start");
    MojoExecution mojoExecution = new MojoExecution(mojoDescriptor, mergedConfig);
    mavenSession.setCurrentProject(project);
    this.pluginManager.executeMojo(mavenSession, mojoExecution);

    List<SwarmProcess> launched = (List<SwarmProcess>) mavenSession.getPluginContext(pluginDescriptor, project).get(SWARM_PROCESS);

    List<SwarmProcess> procs = (List<SwarmProcess>) getPluginContext().get(SWARM_PROCESS);

    if (procs == null) {
        procs = new ArrayList<>();
        getPluginContext().put(SWARM_PROCESS, procs);
    }

    procs.addAll(launched);

    mavenSession.setCurrentProject(this.project);
}
 
开发者ID:wildfly-swarm,项目名称:wildfly-swarm,代码行数:31,代码来源:MultiStartMojo.java

示例12: startProject

import org.apache.maven.plugin.PluginNotFoundException; //导入依赖的package包/类
@SuppressWarnings("unchecked")
protected void startProject(MavenProject project, String executionId, XmlPlexusConfiguration process) throws InvalidPluginDescriptorException, PluginResolutionException, PluginDescriptorParsingException, PluginNotFoundException, PluginConfigurationException, MojoFailureException, MojoExecutionException, PluginManagerException {
    Plugin plugin = this.project.getPlugin("org.wildfly.swarm:wildfly-swarm-plugin");

    Xpp3Dom config = getConfiguration(project, executionId);
    Xpp3Dom processConfig = getProcessConfiguration(process);

    Xpp3Dom globalConfig = getGlobalConfig();
    Xpp3Dom mergedConfig = Xpp3DomUtils.mergeXpp3Dom(processConfig, config);
    mergedConfig = Xpp3DomUtils.mergeXpp3Dom(mergedConfig, globalConfig);

    PluginDescriptor pluginDescriptor = this.pluginManager.loadPlugin(plugin, project.getRemotePluginRepositories(), this.repositorySystemSession);
    MojoDescriptor mojoDescriptor = pluginDescriptor.getMojo("start");
    MojoExecution mojoExecution = new MojoExecution(mojoDescriptor, mergedConfig);
    mavenSession.setCurrentProject(project);
    this.pluginManager.executeMojo(mavenSession, mojoExecution);

    List<SwarmProcess> launched = (List<SwarmProcess>) mavenSession.getPluginContext(pluginDescriptor, project).get("swarm-process");

    List<SwarmProcess> procs = (List<SwarmProcess>) getPluginContext().get("swarm-process");

    if (procs == null) {
        procs = new ArrayList<>();
        getPluginContext().put("swarm-process", procs);
    }

    procs.addAll(launched);

    mavenSession.setCurrentProject(this.project);
}
 
开发者ID:wildfly-swarm-archive,项目名称:ARCHIVE-wildfly-swarm,代码行数:31,代码来源:MultiStartMojo.java

示例13: setupMojoExecutions

import org.apache.maven.plugin.PluginNotFoundException; //导入依赖的package包/类
private void setupMojoExecutions( MavenSession session, MavenProject project, List<MojoExecution> mojoExecutions )
    throws PluginNotFoundException, PluginResolutionException, PluginDescriptorParsingException,
    MojoNotFoundException, InvalidPluginDescriptorException, NoPluginFoundForPrefixException,
    LifecyclePhaseNotFoundException, LifecycleNotFoundException, PluginVersionResolutionException
{
    for ( MojoExecution mojoExecution : mojoExecutions )
    {
        setupMojoExecution( session, project, mojoExecution );
    }
}
 
开发者ID:gems-uff,项目名称:oceano,代码行数:11,代码来源:DefaultLifecycleExecutionPlanCalculator.java

示例14: calculateMojoExecutions

import org.apache.maven.plugin.PluginNotFoundException; //导入依赖的package包/类
public List<MojoExecution> calculateMojoExecutions( MavenSession session, MavenProject project,
                                                     List<Object> tasks )
    throws PluginNotFoundException, PluginResolutionException, PluginDescriptorParsingException,
    MojoNotFoundException, NoPluginFoundForPrefixException, InvalidPluginDescriptorException,
    PluginVersionResolutionException, LifecyclePhaseNotFoundException
{
    final List<MojoExecution> mojoExecutions = new ArrayList<MojoExecution>();

    for ( Object task : tasks )
    {
        if ( task instanceof GoalTask )
        {
            String pluginGoal = ( (GoalTask) task ).pluginGoal;

            MojoDescriptor mojoDescriptor = mojoDescriptorCreator.getMojoDescriptor( pluginGoal, session, project );

            MojoExecution mojoExecution =
                new MojoExecution( mojoDescriptor, "default-cli", MojoExecution.Source.CLI );

            mojoExecutions.add( mojoExecution );
        }
        else if ( task instanceof LifecycleTask )
        {
            String lifecyclePhase = ( (LifecycleTask) task ).getLifecyclePhase();

            Map<String, List<MojoExecution>> phaseToMojoMapping =
                calculateLifecycleMappings( session, project, lifecyclePhase );

            for ( List<MojoExecution> mojoExecutionsFromLifecycle : phaseToMojoMapping.values() )
            {
                mojoExecutions.addAll( mojoExecutionsFromLifecycle );
            }
        }
        else
        {
            throw new IllegalStateException( "unexpected task " + task );
        }
    }
    return mojoExecutions;
}
 
开发者ID:gems-uff,项目名称:oceano,代码行数:41,代码来源:DefaultLifecycleExecutionPlanCalculator.java

示例15: calculateForkedExecutions

import org.apache.maven.plugin.PluginNotFoundException; //导入依赖的package包/类
public void calculateForkedExecutions( MojoExecution mojoExecution, MavenSession session )
    throws MojoNotFoundException, PluginNotFoundException, PluginResolutionException,
    PluginDescriptorParsingException, NoPluginFoundForPrefixException, InvalidPluginDescriptorException,
    LifecyclePhaseNotFoundException, LifecycleNotFoundException, PluginVersionResolutionException
{
    calculateForkedExecutions( mojoExecution, session, session.getCurrentProject(), new HashSet<MojoDescriptor>() );
}
 
开发者ID:gems-uff,项目名称:oceano,代码行数:8,代码来源:DefaultLifecycleExecutionPlanCalculator.java


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