本文整理汇总了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);
}
示例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);
}
示例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;
}