private MojoExecution getMojoExecution(String executionId, MojoDescriptor mojoDescriptor) { if (executionId != null) { return new MojoExecution(mojoDescriptor, executionId); } else { return new MojoExecution(mojoDescriptor, toXpp3Dom(mojoDescriptor.getMojoConfiguration())); } }
MojoExecution mojoExecution = new MojoExecution( mojoDescriptor, executionId, MojoExecution.Source.CLI );
private List<MojoExecution> calculateForkedGoal( MojoExecution mojoExecution, MavenSession session, MavenProject project, Collection<MojoDescriptor> alreadyForkedExecutions ) throws MojoNotFoundException, PluginNotFoundException, PluginResolutionException, PluginDescriptorParsingException, NoPluginFoundForPrefixException, InvalidPluginDescriptorException, LifecyclePhaseNotFoundException, LifecycleNotFoundException, PluginVersionResolutionException { MojoDescriptor mojoDescriptor = mojoExecution.getMojoDescriptor(); PluginDescriptor pluginDescriptor = mojoDescriptor.getPluginDescriptor(); String forkedGoal = mojoDescriptor.getExecuteGoal(); MojoDescriptor forkedMojoDescriptor = pluginDescriptor.getMojo( forkedGoal ); if ( forkedMojoDescriptor == null ) { throw new MojoNotFoundException( forkedGoal, pluginDescriptor ); } if ( alreadyForkedExecutions.contains( forkedMojoDescriptor ) ) { return Collections.emptyList(); } MojoExecution forkedExecution = new MojoExecution( forkedMojoDescriptor, forkedGoal ); mojoExecutionConfigurator( forkedExecution ).configure( project, forkedExecution, true ); finalizeMojoConfiguration( forkedExecution ); calculateForkedExecutions( forkedExecution, session, project, alreadyForkedExecutions ); return Collections.singletonList( forkedExecution ); }
MojoExecution mojoExecution = new MojoExecution( plugin, goal, execution.getId() ); mojoExecution.setLifecyclePhase( execution.getPhase() ); addMojoExecution( phaseBindings, mojoExecution, execution.getPriority() ); if ( phaseBindings != null ) MojoExecution mojoExecution = new MojoExecution( mojoDescriptor, execution.getId() ); mojoExecution.setLifecyclePhase( mojoDescriptor.getPhase() ); addMojoExecution( phaseBindings, mojoExecution, execution.getPriority() );
new MojoExecution( forkedMojoDescriptor, mojoExecution.getExecutionId() );
/** * * @param goal * @return * @since 2.0 */ protected MojoExecution newMojoExecution( String goal ) { MojoDescriptor mojoDescriptor = mojoDescriptors.get( goal ); assertNotNull(String.format("The MojoDescriptor for the goal %s cannot be null.", goal), mojoDescriptor ); MojoExecution execution = new MojoExecution( mojoDescriptor ); finalizeMojoConfiguration( execution ); return execution; }
private MojoExecution getMojoExecution(String executionId, MojoDescriptor mojoDescriptor) { if (executionId != null) { return new MojoExecution(mojoDescriptor, executionId); } else { return new MojoExecution(mojoDescriptor, toXpp3Dom(mojoDescriptor.getMojoConfiguration())); } }
private static MojoExecution mojoExecution(MojoDescriptor mojoDescriptor, String executionId, Xpp3Dom configuration) { if (executionId != null) { return new MojoExecution(mojoDescriptor, executionId); } else { configuration = Xpp3DomUtils.mergeXpp3Dom(configuration, toXpp3Dom(mojoDescriptor.getMojoConfiguration())); return new MojoExecution(mojoDescriptor, configuration); } }
private static MojoExecution mojoExecution(MojoDescriptor mojoDescriptor, String executionId, Xpp3Dom configuration) { if (executionId != null) { return new MojoExecution(mojoDescriptor, executionId); } else { configuration = Xpp3DomUtils.mergeXpp3Dom(configuration, toXpp3Dom(mojoDescriptor.getMojoConfiguration())); return new MojoExecution(mojoDescriptor, configuration); } }
private static MojoExecution mojoExecution(MojoDescriptor mojoDescriptor, String executionId, Xpp3Dom configuration) { if (executionId != null) { return new MojoExecution(mojoDescriptor, executionId); } else { configuration = Xpp3DomUtils.mergeXpp3Dom(configuration, toXpp3Dom(mojoDescriptor.getMojoConfiguration())); return new MojoExecution(mojoDescriptor, configuration); } }
@Override public MojoExecution newMojoExecution(String goal) { MojoDescriptor mojoDescriptor = mojoDescriptors.get(goal); assertNotNull(String.format("The MojoDescriptor for the goal %s cannot be null.", goal), mojoDescriptor); MojoExecution execution = new MojoExecution(mojoDescriptor); execution.setConfiguration(new Xpp3Dom("configuration")); return execution; }
/** * * @param goal * @return * @since 2.0 */ protected MojoExecution newMojoExecution( String goal ) { MojoDescriptor mojoDescriptor = mojoDescriptors.get( goal ); assertNotNull( mojoDescriptor ); MojoExecution execution = new MojoExecution( mojoDescriptor ); finalizeMojoConfiguration( execution ); return execution; }
public VersionsExpressionEvaluator( MavenSession mavenSession, PathTranslator pathTranslator, MavenProject mavenProject ) { super( mavenSession, new MojoExecution( new MojoDescriptor() ), pathTranslator, null, mavenProject, mavenSession.getExecutionProperties() ); } }
public VersionsExpressionEvaluator( MavenSession mavenSession, PathTranslator pathTranslator, MavenProject mavenProject ) { super( mavenSession, new MojoExecution( new MojoDescriptor() ), pathTranslator, null, mavenProject, mavenSession.getExecutionProperties() ); } }
/** * The Constructor. * * @param context the the context * @param pathTranslator the the path translator * @param project the the project */ public TeaCompilerExpressionEvaluator( MavenSession context, PathTranslator pathTranslator, MavenProject project ) { super( context, new MojoExecution( new MojoDescriptor() ), pathTranslator, null, project, context.getExecutionProperties() ); } }
/** * This constructor is kept for backward compatibility. * * @param theContext {@link MavenSession} * @param thePathTranslator {@link PathTranslator} * @param theProject {@link MavenProject} * * @deprecated Will be removed with 2.0 */ public EnforcerExpressionEvaluator( MavenSession theContext, PathTranslator thePathTranslator, MavenProject theProject ) { super( theContext, new MojoExecution( new MojoDescriptor() ), thePathTranslator, null, theProject, theContext.getExecutionProperties() ); } }
@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); }
public ExpressionEvaluatorImpl(final MavenSession context, final MavenProject project) { this.context = context; this.mojoExecution = new MojoExecution(new MojoDescriptor()); this.pathTranslator = lookupPathTranslator(); this.project = project; this.basedir = lookupBasedir(); }
public ExpressionEvaluatorImpl(final MavenSession context, final MavenProject project) { this.context = context; this.mojoExecution = new MojoExecution(new MojoDescriptor()); this.pathTranslator = lookupPathTranslator(); this.project = project; this.basedir = lookupBasedir(); }
/** * Instantiates a new mock enforcer expression evaluator. * * @param theContext the context */ public MockEnforcerExpressionEvaluator( MavenSession theContext ) { super( theContext, new MojoExecution( new MojoDescriptor() ) ); }