本文整理了Java中org.apache.maven.plugin.MojoExecution.getSource()
方法的一些代码示例,展示了MojoExecution.getSource()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。MojoExecution.getSource()
方法的具体详情如下:
包路径:org.apache.maven.plugin.MojoExecution
类名称:MojoExecution
方法名:getSource
[英]Gets the source of this execution.
[中]获取此执行的源。
代码示例来源:origin: apache/maven
@Override
public void setupMojoExecution( MavenSession session, MavenProject project, MojoExecution mojoExecution )
throws PluginNotFoundException, PluginResolutionException, PluginDescriptorParsingException,
MojoNotFoundException, InvalidPluginDescriptorException, NoPluginFoundForPrefixException,
LifecyclePhaseNotFoundException, LifecycleNotFoundException, PluginVersionResolutionException
{
MojoDescriptor mojoDescriptor = mojoExecution.getMojoDescriptor();
if ( mojoDescriptor == null )
{
mojoDescriptor =
pluginManager.getMojoDescriptor( mojoExecution.getPlugin(), mojoExecution.getGoal(),
project.getRemotePluginRepositories(),
session.getRepositorySession() );
mojoExecution.setMojoDescriptor( mojoDescriptor );
}
mojoExecutionConfigurator( mojoExecution ).configure( project,
mojoExecution,
MojoExecution.Source.CLI.equals( mojoExecution.getSource() ) );
finalizeMojoConfiguration( mojoExecution );
calculateForkedExecutions( mojoExecution, session, project, new HashSet<MojoDescriptor>() );
}
代码示例来源:origin: apache/maven
if ( MojoExecution.Source.CLI.equals( mojoExecution.getSource() ) )
代码示例来源:origin: org.apache.maven.plugins/maven-dependency-plugin
/**
* Determines if all projects in the reactor should be purged from their dependencies. When this goal is started on
* the command-line, it is always the case. When it is bound to a phase in the lifecycle, it is never the case.
*
* @return <code>true</code> if all projects in the reactor should be purged, <code>false</code> otherwise.
*/
private boolean shouldPurgeAllProjectsInReactor()
{
Source source = mojoExecution.getSource();
return reactorProjects.size() > 1 && source == Source.CLI;
}
代码示例来源:origin: ImmobilienScout24/deadcode4j
private void logWelcome() {
if (mojoExecution != null && CLI.equals(mojoExecution.getSource())) {
getLog().info("Thanks for calling me! Let's see what I can do for you...");
}
}
代码示例来源:origin: ImmobilienScout24/deadcode4j
private void logGoodbye() {
if (mojoExecution != null && CLI.equals(mojoExecution.getSource())) {
getLog().info("Expected something different? Don't like the results? " +
"Hop on over to https://github.com/ImmobilienScout24/deadcode4j to learn more!");
}
}
代码示例来源:origin: com.sap.cloud.s4hana.plugins/usage-analytics
if( mojoExecution.getSource() != MojoExecution.Source.LIFECYCLE ) {
logger.info("Skipping, not invoked in build lifecycle.");
return;
内容来源于网络,如有侵权,请联系作者删除!