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


Java MojoExecution.getExecutionId方法代码示例

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


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

示例1: NarTestCompileBuildParticipant

import org.apache.maven.plugin.MojoExecution; //导入方法依赖的package包/类
public NarTestCompileBuildParticipant(MojoExecution execution, boolean runOnIncremental, boolean runOnConfiguration) {
	super(new MojoExecution(execution.getMojoDescriptor(), execution.getExecutionId(), execution.getSource()), runOnIncremental, runOnConfiguration);
	// Some versions of nar-maven-plugin don't have a nar-test-unpack goal
	// this means the test artifacts won't be available to us.
	// What we need to do is run the nar-testCompile goal without any tests
	// its configuration in order to just unpack.
	Xpp3Dom configuration = new Xpp3Dom(execution.getConfiguration());
	logger.debug("Configuration before: " + configuration);
	for (int i = 0; i < configuration.getChildCount(); ++i) {
		if ("tests".equals(configuration.getChild(i).getName())) {
			configuration.removeChild(i);
			break;
		}
	}
	logger.debug("Configuration after: " + configuration);
	getMojoExecution().setConfiguration(configuration);
}
 
开发者ID:maven-nar,项目名称:m2e-nar,代码行数:18,代码来源:NarTestCompileBuildParticipant.java

示例2: releaseMojo

import org.apache.maven.plugin.MojoExecution; //导入方法依赖的package包/类
public void releaseMojo( Object mojo, MojoExecution mojoExecution )
{
    if ( mojo != null )
    {
        try
        {
            container.release( mojo );
        }
        catch ( ComponentLifecycleException e )
        {
            String goalExecId = mojoExecution.getGoal();

            if ( mojoExecution.getExecutionId() != null )
            {
                goalExecId += " {execution: " + mojoExecution.getExecutionId() + "}";
            }

            logger.debug( "Error releasing mojo for " + goalExecId, e );
        }
    }
}
 
开发者ID:gems-uff,项目名称:oceano,代码行数:22,代码来源:DefaultMavenPluginManager.java

示例3: MojoProfile

import org.apache.maven.plugin.MojoExecution; //导入方法依赖的package包/类
public MojoProfile(Context c, MojoExecution mojoExecution, ExecutionEvent event) {
	super(new Timer(), event, c);
	
	this.mojoExecution = mojoExecution;
	this.pluginGroupID = mojoExecution.getGroupId();
	this.pluginArtifactID = mojoExecution.getArtifactId();
	this.pluginVersion = mojoExecution.getVersion();
	this.pluginExecutionId = mojoExecution.getExecutionId();
	
	this.event = event;
	
	// get the configuration of the plugin if the group id matches the KEY.
	// please replace the KEY
	String configuration = "";
	if (mojoExecution.getPlugin().getConfiguration() != null 
			&& mojoExecution.getPlugin().getGroupId().contains("KEY")) {
		configuration = mojoExecution.getPlugin().getConfiguration().toString();
	}
	String payload = " (" + pluginExecutionId + ")  " + configuration;
	
	if (getSession() != null) {
		plugin.setGroupId(pluginGroupID);
		plugin.setArtifactId(pluginArtifactID);
		plugin.setVersion(pluginVersion);
		plugin.setPluginKey(mojoExecution.getPlugin().getId());
		plugin.setStartTime(new Date(this.getTimer().getStartTime()));
		plugin.setPayload(payload);
		plugin.setExecutionId(pluginExecutionId);
		if (getSession().getCurrentProject().getPhases().size() > 0) {
			getSession().getCurrentProject().getLastPhase().getPlugins().add(plugin);
		}
	}
}
 
开发者ID:eBay,项目名称:mTracker,代码行数:34,代码来源:MojoProfile.java

示例4: append

import org.apache.maven.plugin.MojoExecution; //导入方法依赖的package包/类
private void append( StringBuilder buffer, MojoExecution me )
{
    buffer.append( me.getArtifactId() ).append( ':' ).append( me.getVersion() );
    buffer.append( ':' ).append( me.getGoal() );
    if ( me.getExecutionId() != null )
    {
        buffer.append( " (" ).append( me.getExecutionId() ).append( ')' );
    }
}
 
开发者ID:gems-uff,项目名称:oceano,代码行数:10,代码来源:ExecutionEventLogger.java

示例5: debugMojoExecution

import org.apache.maven.plugin.MojoExecution; //导入方法依赖的package包/类
private void debugMojoExecution( MojoExecution mojoExecution )
{
    String mojoExecId =
        mojoExecution.getGroupId() + ':' + mojoExecution.getArtifactId() + ':' + mojoExecution.getVersion() + ':'
            + mojoExecution.getGoal() + " (" + mojoExecution.getExecutionId() + ')';

    Map<String, List<MojoExecution>> forkedExecutions = mojoExecution.getForkedExecutions();
    if ( !forkedExecutions.isEmpty() )
    {
        for ( Map.Entry<String, List<MojoExecution>> fork : forkedExecutions.entrySet() )
        {
            logger.debug( "--- init fork of " + fork.getKey() + " for " + mojoExecId + " ---" );

            debugDependencyRequirements( fork.getValue() );

            for ( MojoExecution forkedExecution : fork.getValue() )
            {
                debugMojoExecution( forkedExecution );
            }

            logger.debug( "--- exit fork of " + fork.getKey() + " for " + mojoExecId + " ---" );
        }
    }

    logger.debug( "-----------------------------------------------------------------------" );
    logger.debug( "Goal:          " + mojoExecId );
    logger.debug(
        "Style:         " + ( mojoExecution.getMojoDescriptor().isAggregator() ? "Aggregating" : "Regular" ) );
    logger.debug( "Configuration: " + mojoExecution.getConfiguration() );
}
 
开发者ID:gems-uff,项目名称:oceano,代码行数:31,代码来源:LifecycleDebugLogger.java

示例6: getIdForProfile

import org.apache.maven.plugin.MojoExecution; //导入方法依赖的package包/类
private String getIdForProfile(MojoExecution pluginExecution) {
    String executionId = pluginExecution.getExecutionId();
    if (executionId != null && usedExecutionIds.add(executionId)) {
        return executionId;
    }
    String id;
    do {
        id = "maven-" + executionIdGenerator++;
    } while (!usedExecutionIds.add(id));
    return id;
}
 
开发者ID:konsoletyper,项目名称:teavm,代码行数:12,代码来源:TeaVMProjectConfigurator.java

示例7: createMojoKey

import org.apache.maven.plugin.MojoExecution; //导入方法依赖的package包/类
private MojoKey createMojoKey( MojoExecution mojo )
{
    return new MojoKey( mojo.getGroupId(), mojo.getArtifactId(), mojo.getVersion(), mojo.getGoal(),
                        mojo.getExecutionId(), mojo.getLifecyclePhase() );
}
 
开发者ID:khmarbaise,项目名称:maven-buildtime-profiler,代码行数:6,代码来源:MojoTimer.java

示例8: _handle

import org.apache.maven.plugin.MojoExecution; //导入方法依赖的package包/类
@Override
public boolean _handle(@Nonnull ExecutionEvent executionEvent) {
    List<String> configurationParameters = getConfigurationParametersToReport(executionEvent);

    Xpp3Dom root = new Xpp3Dom("ExecutionEvent");
    root.setAttribute("class", executionEvent.getClass().getName());
    root.setAttribute("type", executionEvent.getType().name());

    root.addChild(newElement("project", executionEvent.getProject()));

    MojoExecution execution = executionEvent.getMojoExecution();

    if (execution == null) {
        root.addChild(new Xpp3Dom("no-execution-found"));
    } else {
        Xpp3Dom plugin = new Xpp3Dom("plugin");
        root.addChild(plugin);

        plugin.setAttribute("groupId", execution.getGroupId());
        plugin.setAttribute("artifactId", execution.getArtifactId());
        plugin.setAttribute("goal", execution.getGoal());
        plugin.setAttribute("version", execution.getVersion());
        if (execution.getExecutionId() != null) {
            // See JENKINS-47508, caused by plugin being declared and invoked by the <reports> section
            plugin.setAttribute("executionId", execution.getExecutionId());
        }
        if (execution.getLifecyclePhase() != null) {
            // protect against null lifecyclePhase. cause is NOT clear
            plugin.setAttribute("lifecyclePhase", execution.getLifecyclePhase());
        }

        for (String configurationParameter : configurationParameters) {
            Xpp3Dom element = fullClone(configurationParameter, execution.getConfiguration().getChild(configurationParameter));
            if (element != null) {
                plugin.addChild(element);
            }
        }
    }

    addDetails(executionEvent, root);

    reporter.print(root);

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

示例9: getFileSystemServerKey

import org.apache.maven.plugin.MojoExecution; //导入方法依赖的package包/类
protected static String getFileSystemServerKey( MojoExecution mojoExecution )
{
    return FileSystemServer.class.getName() + "@" + mojoExecution.getExecutionId(); 
}
 
开发者ID:mojohaus,项目名称:mrm,代码行数:5,代码来源:StartMojo.java

示例10: ExecutionKey

import org.apache.maven.plugin.MojoExecution; //导入方法依赖的package包/类
/**
 * Constructor.
 *
 * @param mojoExecution The mojo execution as provided by Maven.
 */
private ExecutionKey(MojoExecution mojoExecution) {
    this.goal = mojoExecution.getGoal();
    this.execution = mojoExecution.getExecutionId();
}
 
开发者ID:buschmais,项目名称:jqa-maven-plugin,代码行数:10,代码来源:AbstractMojo.java


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