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


Java ExecutionEvent.Type方法代码示例

本文整理汇总了Java中org.apache.maven.execution.ExecutionEvent.Type方法的典型用法代码示例。如果您正苦于以下问题:Java ExecutionEvent.Type方法的具体用法?Java ExecutionEvent.Type怎么用?Java ExecutionEvent.Type使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.maven.execution.ExecutionEvent的用法示例。


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

示例1: create

import org.apache.maven.execution.ExecutionEvent; //导入方法依赖的package包/类
public static ExecutionEventObject create(JSONObject obj, ExecutionEvent.Type t) {
    Long count = (Long) obj.get("prjcount");
    int prjCount = -1;
    if (count != null) {
        prjCount = count.intValue();
    }
    ExecSession toRet = new ExecSession(prjCount, t);
    JSONArray arr = (JSONArray) obj.get("mvncoreurls");
    if (arr != null) {
        List<URL> urlList = new ArrayList<URL>();
        Iterator it = arr.iterator();
        while (it.hasNext()) {
            String url = (String) it.next();
            try {
                urlList.add(new URL(url));
            } catch (MalformedURLException ex) {
                Exceptions.printStackTrace(ex);
            }
        }
        toRet.setMnvcoreurls(urlList.toArray(new URL[0]));
    }
    
    return toRet;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:25,代码来源:ExecSession.java

示例2: createEndForStart

import org.apache.maven.execution.ExecutionEvent; //导入方法依赖的package包/类
private ExecutionEventObject createEndForStart(ExecutionEventObject start) {
    ExecutionEventObject toRet;
    if (start instanceof ExecMojo) {
        ExecMojo startEx = (ExecMojo) start;
        toRet = new ExecMojo(startEx.goal, startEx.plugin, startEx.phase, startEx.executionId, ExecutionEvent.Type.MojoFailed);
    } else if (start instanceof ExecProject) {
        ExecProject startPrj = (ExecProject) start;
        toRet = new ExecProject(startPrj.gav, startPrj.currentProjectLocation, ExecutionEvent.Type.ProjectFailed);
    } else if (start instanceof ExecSession) {
        ExecSession ss = (ExecSession) start;
        toRet = new ExecSession(ss.projectCount, ExecutionEvent.Type.SessionEnded);
    } else {
        ExecutionEvent.Type endType;
        if (start.type.equals(ExecutionEvent.Type.ForkStarted)) {
            endType = ExecutionEvent.Type.ForkFailed;
        } else if (start.type.equals(ExecutionEvent.Type.ForkedProjectStarted)) {
            endType = ExecutionEvent.Type.ForkedProjectFailed;
        } else {
            throw new RuntimeException("unknown event type: " + start.type);
        }
        toRet = new ExecutionEventObject(endType);
    }
    return toRet;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:25,代码来源:CommandLineOutputHandler.java

示例3: ExecMojo

import org.apache.maven.execution.ExecutionEvent; //导入方法依赖的package包/类
public ExecMojo(String goal, GAV plugin, String phase, String executionId, ExecutionEvent.Type type) {
    super(type);
    this.goal = goal;
    this.plugin = plugin;
    this.phase = phase;
    this.executionId = executionId;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:8,代码来源:ExecMojo.java

示例4: create

import org.apache.maven.execution.ExecutionEvent; //导入方法依赖的package包/类
public static ExecutionEventObject create(JSONObject obj) {
    String s = (String) obj.get("type");
    ExecutionEvent.Type t = ExecutionEvent.Type.valueOf(s);
    if (mojo_types.contains(t)) {
        return ExecMojo.create(obj, t);
    }
    if (project_types.contains(t)) {
        return ExecProject.create(obj, t);
    }
    if (session_types.contains(t)) {
        return ExecSession.create(obj, t);
    }
    return new ExecutionEventObject(t);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:15,代码来源:ExecutionEventObject.java

示例5: findParentNodeOfType

import org.apache.maven.execution.ExecutionEvent; //导入方法依赖的package包/类
public ExecutionEventObject.Tree findParentNodeOfType(ExecutionEvent.Type startType) {
    if (parentNode == null) {
        return null;
    }
    ExecutionEventObject event = parentNode.getStartEvent();
    if (event == null) {
        return null;
    }
    if (startType.equals(event.type)) {
        return parentNode;
    }
    return parentNode.findParentNodeOfType(startType);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:14,代码来源:ExecutionEventObject.java

示例6: create

import org.apache.maven.execution.ExecutionEvent; //导入方法依赖的package包/类
public static ExecutionEventObject create(JSONObject obj, ExecutionEvent.Type t) {
    JSONObject prj = (JSONObject) obj.get("prj");
    String id = (String) prj.get("id");
    String[] ids = id.split(":");
    GAV prjGav = new GAV(ids[0], ids[1], ids[2]);
    File prjFile = null;
    String file = (String) prj.get("file");
    if (file != null) {
        prjFile = FileUtil.normalizeFile(new File(file));
    }
    return new ExecProject(prjGav, prjFile, t);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:13,代码来源:ExecProject.java

示例7: handle

import org.apache.maven.execution.ExecutionEvent; //导入方法依赖的package包/类
public boolean handle(@Nonnull Object event) {
    if (!(event instanceof ExecutionEvent)) {
        return false;
    }
    ExecutionEvent executionEvent = (ExecutionEvent) event;
    ExecutionEvent.Type supportedType = getSupportedType();

    if (supportedType != null && !(supportedType.equals(executionEvent.getType()))) {
        return false;
    }

    String supportedGoal = getSupportedPluginGoal();
    if (supportedGoal == null) {
        return _handle(executionEvent);
    } else {
        String[] gag = supportedGoal.split(":");
        if (gag.length == 3) {
            MojoExecution execution = executionEvent.getMojoExecution();
            if (execution.getGroupId().equals(gag[0]) && execution.getArtifactId().equals(gag[1]) && execution.getGoal().equals(gag[2])) {
                _handle(executionEvent);
                return true;
            } else {
                return false;
            }
        } else {
            reporter.print(toString() + " - unsupported supportedPluginGoal:" + supportedGoal);
            return false;
        }
    }

}
 
开发者ID:jenkinsci,项目名称:pipeline-maven-plugin,代码行数:32,代码来源:AbstractExecutionHandler.java

示例8: matchingEvents

import org.apache.maven.execution.ExecutionEvent; //导入方法依赖的package包/类
private boolean matchingEvents(ExecutionEvent.Type typeEnd, ExecutionEvent.Type typeStart) {
    ExecutionEvent.Type match = END_TO_START_Mappings.get(typeEnd);
    assert match != null : "unknown event type:" + typeEnd;
    return typeStart.equals(match);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:6,代码来源:CommandLineOutputHandler.java

示例9: ExecutionEventObject

import org.apache.maven.execution.ExecutionEvent; //导入方法依赖的package包/类
public ExecutionEventObject(ExecutionEvent.Type type) {
    this.type = type;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:4,代码来源:ExecutionEventObject.java

示例10: ExecSession

import org.apache.maven.execution.ExecutionEvent; //导入方法依赖的package包/类
public ExecSession(int projectCount, ExecutionEvent.Type type) {
    super(type);
    this.projectCount = projectCount;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:5,代码来源:ExecSession.java

示例11: ExecProject

import org.apache.maven.execution.ExecutionEvent; //导入方法依赖的package包/类
public ExecProject(GAV currentProject, File currentProjectLocation, ExecutionEvent.Type type) {
    super(type);
    this.gav = currentProject;
    this.currentProjectLocation = currentProjectLocation;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:6,代码来源:ExecProject.java

示例12: getSupportedType

import org.apache.maven.execution.ExecutionEvent; //导入方法依赖的package包/类
@Nullable
@Override
protected ExecutionEvent.Type getSupportedType() {
    return ExecutionEvent.Type.MojoSucceeded;
}
 
开发者ID:jenkinsci,项目名称:pipeline-maven-plugin,代码行数:6,代码来源:DeployDeployExecutionHandler.java

示例13: getSupportedType

import org.apache.maven.execution.ExecutionEvent; //导入方法依赖的package包/类
@Nullable
protected ExecutionEvent.Type getSupportedType() {
    return ExecutionEvent.Type.MojoSucceeded;
}
 
开发者ID:jenkinsci,项目名称:pipeline-maven-plugin,代码行数:5,代码来源:FailsafeTestExecutionHandler.java

示例14: getSupportedType

import org.apache.maven.execution.ExecutionEvent; //导入方法依赖的package包/类
@Nullable
protected abstract ExecutionEvent.Type getSupportedType();
 
开发者ID:jenkinsci,项目名称:pipeline-maven-plugin,代码行数:3,代码来源:AbstractExecutionHandler.java

示例15: getSupportedType

import org.apache.maven.execution.ExecutionEvent; //导入方法依赖的package包/类
@Override
protected ExecutionEvent.Type getSupportedType() {
    return ExecutionEvent.Type.ProjectStarted;
}
 
开发者ID:jenkinsci,项目名称:pipeline-maven-plugin,代码行数:5,代码来源:ProjectStartedExecutionHandler.java


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