Example usage for org.apache.maven.plugin MojoExecution getForkedExecutions

List of usage examples for org.apache.maven.plugin MojoExecution getForkedExecutions

Introduction

In this page you can find the example usage for org.apache.maven.plugin MojoExecution getForkedExecutions.

Prototype

public Map<String, List<MojoExecution>> getForkedExecutions() 

Source Link

Usage

From source file:com.basistech.m2e.code.quality.shared.AbstractMavenPluginProjectConfigurator.java

License:Open Source License

protected MojoExecution findForkedExecution(MojoExecution primary, String groupId, String artifactId,
        String goal) {/*  w w  w  . j a va 2  s.c o  m*/
    Map<String, List<MojoExecution>> forkedExecutions = primary.getForkedExecutions();
    MojoExecution goalExecution = null;
    for (List<MojoExecution> possibleExecutionList : forkedExecutions.values()) {
        for (MojoExecution possibleExecution : possibleExecutionList) {
            if (groupId.equals(possibleExecution.getGroupId())
                    && artifactId.equals(possibleExecution.getArtifactId())
                    && goal.equals(possibleExecution.getGoal())) {
                goalExecution = possibleExecution;
                break;
            }
        }
        if (goalExecution != null) {
            break;
        }
    }
    return goalExecution;
}

From source file:net.oneandone.maven.plugins.prerelease.util.FilteringMojoExecutor.java

License:Apache License

private List<MojoExecution> filter(boolean nested, List<MojoExecution> orig) {
    List<MojoExecution> result;

    result = new ArrayList<>();
    for (MojoExecution execution : orig) {
        if (filter.include(nested, execution)) {
            result.add(execution);//from w w w .j av  a2s  . c  o m
            for (Map.Entry<String, List<MojoExecution>> entry : execution.getForkedExecutions().entrySet()) {
                execution.setForkedExecutions(entry.getKey(), filter(true, entry.getValue()));
            }
        }
    }
    return result;
}