org.apache.maven.plugin.MojoExecution.setLifecyclePhase()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(1.5k)|赞(0)|评价(0)|浏览(87)

本文整理了Java中org.apache.maven.plugin.MojoExecution.setLifecyclePhase()方法的一些代码示例,展示了MojoExecution.setLifecyclePhase()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。MojoExecution.setLifecyclePhase()方法的具体详情如下:
包路径:org.apache.maven.plugin.MojoExecution
类名称:MojoExecution
方法名:setLifecyclePhase

MojoExecution.setLifecyclePhase介绍

暂无

代码示例

代码示例来源:origin: apache/maven

mojoExecution.setLifecyclePhase( execution.getPhase() );
addMojoExecution( phaseBindings, mojoExecution, execution.getPriority() );
mojoExecution.setLifecyclePhase( mojoDescriptor.getPhase() );
addMojoExecution( phaseBindings, mojoExecution, execution.getPriority() );

代码示例来源:origin: io.teecube.tic/tic-bw6

@Override
  public Map<String, List<MojoExecution>> calculateLifecycleMappings(MavenSession session,
                                    MavenProject project,
                                    Lifecycle lifecycle,
                                    String lifecyclePhase)
  throws PluginNotFoundException, PluginResolutionException, PluginDescriptorParsingException, MojoNotFoundException, InvalidPluginDescriptorException {
    List<MojoExecution> mojoExecutions = new ArrayList<MojoExecution>();

    for (Plugin plugin : project.getBuild().getPlugins()) {
      for (PluginExecution execution : plugin.getExecutions()) {
//                if (POST_PHASE.equals(execution.getPhase())) {
          for (String goal : execution.getGoals()) {
            MojoExecution mojoExecution = new MojoExecution(plugin, goal, execution.getId());
            mojoExecution.setLifecyclePhase(execution.getPhase());
            mojoExecutions.add(mojoExecution);
          }
//                }
      }
    }

    return Collections.singletonMap("post", mojoExecutions);
  }

相关文章