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


Java MojoExecution.getArtifactId方法代码示例

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


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

示例1: getBuildParticipant

import org.apache.maven.plugin.MojoExecution; //导入方法依赖的package包/类
@Override
public AbstractBuildParticipant getBuildParticipant(
		IMavenProjectFacade projectFacade, MojoExecution execution,
		IPluginExecutionMetadata executionMetadata) {

	String artifactId = execution.getArtifactId();
	if (log.isDebugEnabled()) {
		log.debug("getBuildParticipant: artifactId={}", artifactId);
	}

	String inputPathParam;
	String outputPathParam;
	
	if ("libsass-maven-plugin".equals(artifactId)) {
		inputPathParam = "inputPath";
		outputPathParam = "outputPath";
	} else if ("sass-maven-plugin".equals(artifactId)) {
		inputPathParam = "sassSourceDirectory";
		outputPathParam = "destination";
	} else {
		throw new IllegalStateException("Unsupported artifactId <"
				+ artifactId + ">");
	}

	return new BuildParticipant(execution, inputPathParam, outputPathParam);
}
 
开发者ID:dashie,项目名称:m2e-plugins,代码行数:27,代码来源:Configurator.java

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

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

示例4: getBuildParticipant

import org.apache.maven.plugin.MojoExecution; //导入方法依赖的package包/类
@Override
public AbstractBuildParticipant getBuildParticipant(IMavenProjectFacade projectFacade, MojoExecution execution,
		IPluginExecutionMetadata executionMetadata) {

	String artifactId = execution.getArtifactId();
	if (log.isDebugEnabled()) {
		log.debug("getBuildParticipant: artifactId={}", artifactId);
	}

	return new GenericBuildParticipant(execution, "sourceDirectory", "outputDirectory");
}
 
开发者ID:dashie,项目名称:m2e-plugins,代码行数:12,代码来源:Configurator.java

示例5: 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.getArtifactId方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。