本文整理了Java中org.twdata.maven.mojoexecutor.MojoExecutor.plugin()
方法的一些代码示例,展示了MojoExecutor.plugin()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。MojoExecutor.plugin()
方法的具体详情如下:
包路径:org.twdata.maven.mojoexecutor.MojoExecutor
类名称:MojoExecutor
方法名:plugin
[英]Defines the plugin without its version or dependencies.
[中]定义没有版本或依赖项的插件。
代码示例来源:origin: com.lotaris.maven.rox.plugins/rox-commons-maven-plugin
/**
* Defines the plugin without its version
*
* @param groupId The group id
* @param artifactId The artifact id
* @return The plugin instance
*/
public static Plugin plugin(String groupId, String artifactId) {
return plugin(groupId, artifactId, null);
}
代码示例来源:origin: org.twdata.maven/mojo-executor
/**
* Defines the plugin without its version or dependencies.
*
* @param groupId The group id
* @param artifactId The artifact id
* @return The plugin instance
*/
public static Plugin plugin(String groupId, String artifactId) {
return plugin(groupId, artifactId, null);
}
代码示例来源:origin: TimMoore/mojo-executor
/**
* Defines the plugin without its version or dependencies.
*
* @param groupId The group id
* @param artifactId The artifact id
* @return The plugin instance
*/
public static Plugin plugin(String groupId, String artifactId) {
return plugin(groupId, artifactId, null);
}
代码示例来源:origin: org.twdata.maven/mojo-executor
/**
* Defines a plugin without dependencies.
*
* @param groupId The group id
* @param artifactId The artifact id
* @param version The plugin version
* @return The plugin instance
*/
public static Plugin plugin(String groupId, String artifactId, String version) {
return plugin(groupId, artifactId, version, Collections.<Dependency>emptyList());
}
代码示例来源:origin: TimMoore/mojo-executor
/**
* Defines a plugin without dependencies.
*
* @param groupId The group id
* @param artifactId The artifact id
* @param version The plugin version
* @return The plugin instance
*/
public static Plugin plugin(String groupId, String artifactId, String version) {
return plugin(groupId, artifactId, version, Collections.<Dependency>emptyList());
}
代码示例来源: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: ru.yandex.qatools.allure/allure-java-inject
protected Plugin getAspectJPlugin() {
return plugin(
"org.codehaus.mojo",
"aspectj-maven-plugin",
"1.4",
dependencies(
dependency("org.aspectj", "aspectjtools", aspectJVersion)
)
);
}
代码示例来源: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/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 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: 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());
}
内容来源于网络,如有侵权,请联系作者删除!