org.twdata.maven.mojoexecutor.MojoExecutor.configuration()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(9.0k)|赞(0)|评价(0)|浏览(80)

本文整理了Java中org.twdata.maven.mojoexecutor.MojoExecutor.configuration()方法的一些代码示例,展示了MojoExecutor.configuration()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。MojoExecutor.configuration()方法的具体详情如下:
包路径:org.twdata.maven.mojoexecutor.MojoExecutor
类名称:MojoExecutor
方法名:configuration

MojoExecutor.configuration介绍

[英]Builds the configuration for the goal using Elements
[中]使用元素为目标构建配置

代码示例

代码示例来源:origin: com.atlassian.maven.plugins/maven-amps-plugin

private static Xpp3Dom configurationWithoutNullElements(Element... elements)
{
  List<Element> nonNullElements = new ArrayList<Element>();
  for (Element e : elements)
  {
    if (e != null)
    {
      nonNullElements.add(e);
    }
  }
  return configuration(nonNullElements.toArray(new Element[nonNullElements.size()]));
}

代码示例来源:origin: com.atlassian.maven.plugins/amps-maven-plugin

private static Xpp3Dom configurationWithoutNullElements(Element... elements)
{
  return configuration(removeNullElements(elements));
}

代码示例来源:origin: com.bazaarvoice.emodb/emodb-sdk

private Xpp3Dom cassandraStopConfiguration() {
  return configuration(
      element("rpcPort", String.valueOf(cassandraRpcPort)),
      element("stopPort", String.valueOf(CrossMojoState.getCassandraStopPort(getPluginContext()))),
      element("skip", String.valueOf(false))
  );
}

代码示例来源:origin: bazaarvoice/emodb

private Xpp3Dom cassandraStopConfiguration() {
  return configuration(
      element("rpcPort", String.valueOf(cassandraRpcPort)),
      element("stopPort", String.valueOf(CrossMojoState.getCassandraStopPort(getPluginContext()))),
      element("skip", String.valueOf(false))
  );
}

代码示例来源:origin: io.teecube.tic/tic-bw6

private void updateTychoTargetPlatformPlugin() throws XmlPullParserException, IOException {
  if (mavenProject == null) return;
  List<BW6Requirement> bw6Requirements = SetUniqueList.setUniqueList(new ArrayList<BW6Requirement>());
  bw6Requirements.addAll(getBW6Requirements(mavenProject)); // retrieve from configuration of this plugin
  bw6Requirements.addAll(getBW6Requirements(builtinCapabilities));
  bw6Requirements.addAll(getBW6Requirements(customCapabilities));
  // the target-platform-configuration plugin exists because it is part of the lifecycle (see 'plexus/components.xml')
  Plugin tychoTargetPlatformPlugin = mavenProject.getPlugin("org.eclipse.tycho:target-platform-configuration");
  PluginBuilder pluginBuilder = new PluginBuilder(tychoTargetPlatformPlugin);
  List<Element> requirementsConfiguration = getRequirementsConfiguration(bw6Requirements);
  pluginBuilder.addConfiguration(configuration(requirementsConfiguration.toArray(new Element[0])));
}

代码示例来源:origin: org.openmrs.maven.plugins/openmrs-sdk-maven-plugin

private void cleanupPluginFiles() throws MojoExecutionException {
  executeMojo(
      SDKConstants.getReleasePlugin(),
      goal("clean"),
      configuration(),
      executionEnvironment(mavenProject, mavenSession, pluginManager)
  );
}

代码示例来源:origin: org.openmrs.maven.plugins/openmrs-sdk-maven-plugin

private void runMojoExecutor(List<MojoExecutor.Element> configuration, String goal) throws MojoExecutionException {
  executeMojo(
      plugin(
          groupId(FRONTEND_BUILDER_GROUP_ID),
          artifactId(FRONTEND_BUILDER_ARTIFACT_ID),
          version(FRONTEND_BUILDER_VERSION)
      ),
      goal(goal),
      configuration(configuration.toArray(new MojoExecutor.Element[0])),
      executionEnvironment(mavenProject, session, pluginManager)
  );
}

代码示例来源:origin: com.atlassian.maven.plugins/amps-maven-plugin

public void installIdeaPlugin() throws MojoExecutionException
{
  MojoUtils.executeWithMergedConfig(
      plugin(
          groupId("org.twdata.maven"),
          artifactId("maven-cli-plugin"),
          version(defaultArtifactIdToVersionMap.get("maven-cli-plugin"))
      ),
      goal("idea"),
      configuration(),
      executionEnvironment()
  );
}

代码示例来源:origin: com.atlassian.maven.plugins/maven-amps-plugin

public void installIdeaPlugin() throws MojoExecutionException
{
  executeMojo(
      plugin(
          groupId("org.twdata.maven"),
          artifactId("maven-cli-plugin"),
          version(pluginArtifactIdToVersionMap.get("maven-cli-plugin"))
      ),
      goal("idea"),
      configuration(),
      executionEnvironment()
  );
}

代码示例来源:origin: org.openmrs.maven.plugins/openmrs-sdk-maven-plugin

private void executeMojoPlugin(List<MojoExecutor.Element> artifactItems) throws MojoExecutionException {
  executeMojo(
      plugin(
          groupId(SDKConstants.PLUGIN_DEPENDENCIES_GROUP_ID),
          artifactId(SDKConstants.PLUGIN_DEPENDENCIES_ARTIFACT_ID),
          version(SDKConstants.PLUGIN_DEPENDENCIES_VERSION)
      ),
      goal("copy"),
      configuration(
          element(name("artifactItems"), artifactItems.toArray(new MojoExecutor.Element[0]))
      ),
      executionEnvironment(mavenProject, mavenSession, pluginManager)
  );
}

代码示例来源:origin: nidi3/code-assert

private void report() throws MojoExecutionException {
  executeMojo(
      plugin(
          groupId("org.jacoco"),
          artifactId("jacoco-maven-plugin"),
          version(JACOCO_VERSION)
      ),
      goal("report"),
      configuration(),
      executionEnvironment(mavenProject, mavenSession, pluginManager)
  );
}

代码示例来源:origin: nidi3/code-assert

private void executeJacocoPlugin() throws MojoExecutionException {
  executeMojo(
      plugin(
          groupId("org.jacoco"),
          artifactId("jacoco-maven-plugin"),
          version(JACOCO_VERSION)
      ),
      goal("prepare-agent"),
      configuration(),
      executionEnvironment(mavenProject, mavenSession, pluginManager)
  );
}

代码示例来源:origin: ru.yandex.qatools.allure/allure-java-inject

protected Xpp3Dom getAspectJPluginConfiguration() {
  return configuration(
      element("source", javaVersion),
      element("target", javaVersion),
      element("complianceLevel", javaVersion),
      element("aspectLibraries",
          element("aspectLibrary",
              element("groupId", "ru.yandex.qatools.allure"),
              element("artifactId", "allure-java-aspects")
          )
      )
  );
}

代码示例来源:origin: nidi3/code-assert

private void runTest() throws MojoExecutionException {
  executeMojo(
      plugin(
          groupId("org.apache.maven.plugins"),
          artifactId("maven-surefire-plugin"),
          version("2.19.1")
      ),
      goal("test"),
      configuration(
          element("test", testClass),
          element("failIfNoTests", "false")
      ),
      executionEnvironment(mavenProject, mavenSession, pluginManager)
  );
}

代码示例来源:origin: allegro/grunt-maven-plugin

private void runExecutable(Executable executable) throws MojoExecutionException, MojoFailureException {
  Element[] configuration = buildConfigForOS(executable);
  if (executable.overrideSuccessCodes()) {
    Element customSuccessCodes = overwriteSuccessCodes(executable);
    configuration = concat(configuration, customSuccessCodes);
  }
  executeMojo(plugin(
      groupId(EXEC_MAVEN_GROUP),
      artifactId(EXEC_MAVEN_ARTIFACT),
      version(execMavenPluginVersion)),
      goal(EXEC_GOAL),
      configuration(configuration),
      pluginExecutionEnvironment());
}

代码示例来源:origin: allegro/grunt-maven-plugin

@Override
public void executeInternal() throws MojoExecutionException, MojoFailureException {
  executeMojo(plugin(
      groupId(RESOURCES_MAVEN_GROUP),
      artifactId(RESOURCES_MAVEN_ARTIFACT),
      version(mavenResourcesPluginVersion)),
      goal(RESOURCES_GOAL),
      configuration(
          element(name("overwrite"), Boolean.toString(overwriteResources)),
          element(name("outputDirectory"), gruntBuildDirectory),
          element(name("resources"), createResourceElements())
      ),
      pluginExecutionEnvironment());
  createWorkflowTasksDirectory();
  createInnerPropertiesResource();
}

代码示例来源:origin: com.atlassian.maven.plugins/maven-amps-plugin

protected Xpp3Dom baseConfiguration()
{
  return configuration(
      element(name("driver") , dataSource.getDriver()),
      element(name("url"), dataSource.getDefaultDatabase()),
      element(name("username"), dataSource.getSystemUsername()),
      element(name("password"), dataSource.getSystemPassword()),
      // we need commit transaction for drop database and then create them again
      element(name("autocommit"), "true")
  );
}

代码示例来源:origin: com.atlassian.maven.plugins/amps-maven-plugin

protected Xpp3Dom systemDatabaseConfiguration()
{
  return configuration(
      element(name("driver") , dataSource.getDriver()),
      element(name("url"), dataSource.getDefaultDatabase()),
      element(name("username"), dataSource.getSystemUsername()),
      element(name("password"), dataSource.getSystemPassword()),
      element(name("autocommit"), "true")
  );
}

代码示例来源:origin: com.atlassian.maven.plugins/amps-maven-plugin

protected Xpp3Dom productDatabaseConfiguration()
{
  return configuration(
      element(name("driver") , dataSource.getDriver()),
      element(name("url"), dataSource.getUrl()),
      element(name("username"), dataSource.getUsername()),
      element(name("password"), dataSource.getPassword()),
      // we need commit transaction for drop database and then create them again
      element(name("autocommit"), "true")
  );
}

代码示例来源:origin: allegro/grunt-maven-plugin

@Override
  public void executeInternal() throws MojoExecutionException, MojoFailureException {
    executeMojo(plugin(
        groupId(CLEAN_MAVEN_GROUP),
        artifactId(CLEAN_MAVEN_ARTIFACT),
        version(mavenCleanPluginVersion)),
        goal(CLEAN_GOAL),
        configuration(
            element(
                name("filesets"),
                element(name("fileset"),
                    element(name("directory"), gruntBuildDirectory))),
            element(name("excludeDefaultDirectories"), "true")),
        pluginExecutionEnvironment());
  }
}

相关文章