當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。