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

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

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

MojoExecutor.groupId介绍

[英]Wraps the group id string in a more readable format
[中]以更可读的格式包装组id字符串

代码示例

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

/**
 * THIS USED TO Decide whether to use the org.twdata.maven.cargo-maven2-plugin or the org.codehaus.cargo.cargo-maven2-plugin.
 * <p/>
 * This has now been changed to just return the codehaus version since there are new features/fixes we need and the twdata version is no longer useful.
 */
protected Plugin cargo(Product context)
{
  log.info("using codehaus cargo v" + pluginArtifactIdToVersionMap.get("org.codehaus.cargo:cargo-maven2-plugin"));
  return plugin(
      groupId("org.codehaus.cargo"),
      artifactId("cargo-maven2-plugin"),
      version(pluginArtifactIdToVersionMap.get("org.codehaus.cargo:cargo-maven2-plugin")));
}

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

private Plugin bndPlugin()
{
  String bundleVersion = defaultArtifactIdToVersionMap.get("maven-bundle-plugin");
  log.info("using maven-bundle-plugin v" + bundleVersion);
  return plugin(
      groupId("org.apache.felix"),
      artifactId("maven-bundle-plugin"),
      version(bundleVersion));
}

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

/**
 * THIS USED TO Decide whether to use the org.twdata.maven.cargo-maven2-plugin or the org.codehaus.cargo.cargo-maven2-plugin.
 * <p/>
 * This has now been changed to just return the codehaus version since there are new features/fixes we need and the twdata version is no longer useful.
 */
protected Plugin cargo(Product context)
{
  String cargoVersion = defaultArtifactIdToVersionMap.get("cargo-maven2-plugin");
  log.info("using codehaus cargo v" + cargoVersion);
  return plugin(
      groupId("org.codehaus.cargo"),
      artifactId("cargo-maven2-plugin"),
      version(cargoVersion));
}

代码示例来源:origin: ch.sbb.releasetrain/utils-impl

/**
 * Returns the plugin for the given values.
 */
public Plugin getPlugin(MavenProject mavenProject, final String groupId,
    final String artifactId,
    final String version,
    final List<Dependency> dependencies) {
  return plugin(groupId(groupId), artifactId(artifactId),
      version((version != null) ? version : getPluginVersion(mavenProject, groupId, artifactId)),
      (CollectionUtils.isEmpty(dependencies)) ? Collections.<Dependency> emptyList() : dependencies);
}

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

public static Plugin getReleasePlugin() {
    return plugin(
        groupId(SDKConstants.PLUGIN_RELEASE_GROUP_ID),
        artifactId(SDKConstants.PLUGIN_RELEASE_ARTIFACT_ID),
        version(SDKConstants.PLUGIN_RELEASE_VERSION)
    );
  }
}

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

private Plugin bndPlugin()
{
  log.info("using maven-bundle-plugin v" + pluginArtifactIdToVersionMap.get("maven-bundle-plugin"));
  // AMPS-1211: maven-bundle-plugin 2.5.3 broke manifest. Add bndlib dependency for work around solution
  final Plugin bndPlugin = plugin(
      groupId("org.apache.felix"),
      artifactId("maven-bundle-plugin"),
      version(defaultArtifactIdToVersionMap.get("maven-bundle-plugin"))
  );
  final Dependency bndLib = new Dependency();
  bndLib.setGroupId(groupId("biz.aQute.bnd"));
  bndLib.setArtifactId(artifactId("bndlib"));
  bndLib.setVersion(defaultArtifactIdToVersionMap.get("bndlib"));
  bndPlugin.addDependency(bndLib);
  return bndPlugin;
}

代码示例来源: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: org.openmrs.maven.plugins/openmrs-sdk-maven-plugin

private void downloadModulePom(Artifact artifact) throws MojoExecutionException {
  MojoExecutor.Element[] artifactItems = new MojoExecutor.Element[1];
  artifactItems[0] = artifact.toElement("pom/");
  List<Element> configuration = new ArrayList<Element>();
  configuration.add(element("artifactItems", artifactItems));
  executeMojo(
      plugin(
          groupId(SDKConstants.PLUGIN_DEPENDENCIES_GROUP_ID),
          artifactId(SDKConstants.PLUGIN_DEPENDENCIES_ARTIFACT_ID),
          version(SDKConstants.PLUGIN_DEPENDENCIES_VERSION)
      ),
      goal("copy"),
      configuration(configuration.toArray(new Element[0])),
      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/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: com.atlassian.maven.plugins/amps-maven-plugin

public void executeAmpsRecursively(final String ampsVersion, final String ampsGoal, Xpp3Dom cfg) throws MojoExecutionException
{
  MojoUtils.executeWithMergedConfig(
    plugin(
      groupId("com.atlassian.maven.plugins"),
      artifactId("amps-maven-plugin"),
      version(ampsVersion)
    ),
    goal(ampsGoal),
    cfg,
    executionEnvironment());
}

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

public void executeAmpsRecursively(final String ampsVersion, final String ampsGoal, Xpp3Dom cfg) throws MojoExecutionException
{
  executeMojo(
    plugin(
      groupId("com.atlassian.maven.plugins"),
      artifactId("maven-amps-plugin"),
      version(ampsVersion)
    ),
    goal(ampsGoal),
    cfg,
    executionEnvironment());
}

代码示例来源: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: 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 executeJacocoPlugin() throws MojoExecutionException {
  executeMojo(
      plugin(
          groupId("org.jacoco"),
          artifactId("jacoco-maven-plugin"),
          version(JACOCO_VERSION)
      ),
      goal("prepare-agent"),
      configuration(),
      executionEnvironment(mavenProject, mavenSession, pluginManager)
  );
}

代码示例来源: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: 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());
  }
}

代码示例来源:origin: net.orfjackal.retrolambda/retrolambda-maven-plugin

private void retrieveRetrolambdaJar(String version) throws MojoExecutionException {
  // TODO: use Maven's built-in artifact resolving, so that we can refer to retrolambda.jar in the local repository without copying it
  executeMojo(
      plugin(groupId("org.apache.maven.plugins"),
          artifactId("maven-dependency-plugin"),
          version("2.8")),
      goal("copy"),
      configuration(element("artifactItems",
          element("artifactItem",
              element(name("groupId"), "net.orfjackal.retrolambda"),
              element(name("artifactId"), "retrolambda"),
              element(name("version"), version),
              element(name("overWrite"), "true"),
              element(name("outputDirectory"), getRetrolambdaJarDir()),
              element(name("destFileName"), getRetrolambdaJarName())))),
      executionEnvironment(project, session, pluginManager));
}

相关文章