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


Java MojoExecution.setConfiguration方法代码示例

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


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

示例1: configureMojo

import org.apache.maven.plugin.MojoExecution; //导入方法依赖的package包/类
private Mojo configureMojo(final String parameter, final String value) throws Exception {
   final MavenSession mavenSession = mojoRule.newMavenSession(getMavenProject(DEFAULT_CONFIG));
   final MojoExecution mojoExecution = mojoRule.newMojoExecution(GOAL_NAME);
   final Xpp3Dom configuration = new Xpp3Dom("configuration");
   final Xpp3Dom generationConfig = new Xpp3Dom("generationConfig");
   final Xpp3Dom useBigDecimal = new Xpp3Dom(parameter);
   useBigDecimal.setValue(value);
   generationConfig.addChild(useBigDecimal);

   configuration.addChild(generationConfig);
   mojoExecution.setConfiguration(configuration);

   return mojoRule.lookupConfiguredMojo(mavenSession, mojoExecution);
}
 
开发者ID:phoenixnap,项目名称:springmvc-raml-plugin,代码行数:15,代码来源:PojoGenerationConfigTest.java

示例2: compile

import org.apache.maven.plugin.MojoExecution; //导入方法依赖的package包/类
private void compile(File basedir, File processor, String executionId) throws Exception {
  MavenProject project = mojos.readMavenProject(basedir);
  MavenSession session = mojos.newMavenSession(project);
  MojoExecution execution = mojos.newMojoExecution();
  MojoExecution cloned = new MojoExecution(execution.getMojoDescriptor(), executionId, null);
  cloned.setConfiguration(execution.getConfiguration());
  execution.getConfiguration().addChild(newParameter("proc", Proc.none.name()));
  addDependency(project, "processor", new File(processor, "target/classes"));
  mojos.executeMojo(session, project, cloned);
}
 
开发者ID:takari,项目名称:takari-lifecycle,代码行数:11,代码来源:AnnotationProcessingTest.java

示例3: createMojoExecution

import org.apache.maven.plugin.MojoExecution; //导入方法依赖的package包/类
private static MojoExecution createMojoExecution( String goal, String executionId, MojoDescriptor mojoDescriptor )
{
    final Plugin plugin = mojoDescriptor.getPluginDescriptor().getPlugin();
    MojoExecution result = new MojoExecution( plugin, goal, executionId );
    result.setConfiguration( new Xpp3Dom( executionId + "-" + goal ) );
    result.setMojoDescriptor( mojoDescriptor );
    result.setLifecyclePhase( mojoDescriptor.getPhase() );

    return result;

}
 
开发者ID:gems-uff,项目名称:oceano,代码行数:12,代码来源:LifecycleExecutionPlanCalculatorStub.java


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