當前位置: 首頁>>代碼示例>>Java>>正文


Java MojoExecution.getGroupId方法代碼示例

本文整理匯總了Java中org.apache.maven.plugin.MojoExecution.getGroupId方法的典型用法代碼示例。如果您正苦於以下問題:Java MojoExecution.getGroupId方法的具體用法?Java MojoExecution.getGroupId怎麽用?Java MojoExecution.getGroupId使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.apache.maven.plugin.MojoExecution的用法示例。


在下文中一共展示了MojoExecution.getGroupId方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: 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

示例2: 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

示例3: 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


注:本文中的org.apache.maven.plugin.MojoExecution.getGroupId方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。