org.apache.maven.model.Plugin.getExtensions()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(5.2k)|赞(0)|评价(0)|浏览(192)

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

Plugin.getExtensions介绍

[英]Get whether to load Maven extensions (such as packaging and type handlers) from this plugin. For performance reasons, this should only be enabled when necessary. Note: While the type of this field is String for technical reasons, the semantic type is actually Boolean. Default value is false.
[中]获取是否从此插件加载Maven扩展(例如打包和类型处理程序)。出于性能原因,只有在必要时才应启用此功能。注意:由于技术原因,该字段的类型为String,而语义类型实际上为Boolean。默认值为false

代码示例

代码示例来源:origin: apache/maven

protected void mergePlugin_Extensions( Plugin target, Plugin source, boolean sourceDominant,
                    Map<Object, Object> context )
{
  String src = source.getExtensions();
  if ( src != null )
  {
    if ( sourceDominant || target.getExtensions() == null )
    {
      target.setExtensions( src );
      target.setLocation( "extensions", source.getLocation( "extensions" ) );
    }
  }
}

代码示例来源:origin: apache/maven

if ( plugin.getExtensions() != null )
  serializer.startTag( NAMESPACE, "extensions" ).text( plugin.getExtensions() ).endTag( NAMESPACE, "extensions" );

代码示例来源:origin: apache/maven

p.getExtensions(), p.getKey(), p );

代码示例来源:origin: takari/polyglot-maven

private void writePlugin(Plugin plugin, String indent) throws IOException {
  StringBuilder sb = new StringBuilder();
  sb.append(plugin.getGroupId() + ":" + plugin.getArtifactId());
  if (plugin.getVersion() != null) {
    sb.append(":" + plugin.getVersion());
  }
  out.write(indent + "plugin(\"" + sb.toString() + "\")" + br);
  if (plugin.getExtensions() != null) {
    out.write(indent + "    .extensions(" + plugin.getExtensions() + ")" + br);
  }
  if (plugin.getInherited() != null) {
    out.write(indent + "    .inherited(" + plugin.getInherited() + ")" + br);
  }
  if (plugin.getDependencies() != null && !plugin.getDependencies().isEmpty()) {
    out.write(indent + "    " + ".dependencies(" + br);
    writePluginDependency(plugin.getDependencies(), indent);
    out.write(indent + "    " + ")" + br);
  }
  writeConfiguration((Xpp3Dom)plugin.getConfiguration(), indent);
  
  out.write(indent + ".endPlugin()" + br);
}

代码示例来源:origin: takari/polyglot-maven

if ( ( plugin.getExtensions() != null ) && !plugin.getExtensions().equals( "false" ) )
  serializer.attribute( NAMESPACE, "extensions", plugin.getExtensions() );

代码示例来源:origin: lewisd32/lint-maven-plugin

public String getExtensions() {
  return plugin.getExtensions();
}

代码示例来源:origin: io.tesla.maven/maven-model

protected void mergePlugin_Extensions( Plugin target, Plugin source, boolean sourceDominant,
                    Map<Object, Object> context )
{
  String src = source.getExtensions();
  if ( src != null )
  {
    if ( sourceDominant || target.getExtensions() == null )
    {
      target.setExtensions( src );
      target.setLocation( "extensions", source.getLocation( "extensions" ) );
    }
  }
}

代码示例来源:origin: org.kie.workbench.services/kie-wb-common-compiler-core

private void changeKieMavenIntoKieTakariPlugin(Build build, PluginsContainer dto) {
  // Change the kie-maven-plugin into kie-takari-plugin
  if (dto.getKiePluginPresent() && !dto.getKieTakariPresent()) {
    List<Plugin> plugins = build.getPlugins();
    Plugin kieMavenPlugin = build.getPlugins().get(dto.getKieMavenPluginPosition());
    if (kieMavenPlugin.getArtifactId().equals(conf.get(ConfigurationKey.KIE_PLUGIN_GROUP))) {
      Plugin kieTakariPlugin = MavenAPIUtil.getPlugin(kieMavenPlugin.getGroupId(),
                              conf.get(ConfigurationKey.KIE_TAKARI_PLUGIN_ARTIFACT),
                              kieMavenPlugin.getVersion(),
                              Boolean.parseBoolean(kieMavenPlugin.getExtensions()));
      plugins.set(dto.getKieMavenPluginPosition(), kieTakariPlugin);
      build.setPlugins(plugins);
      dto.setOverwritePOM(Boolean.TRUE);
    }
  }
}

代码示例来源:origin: io.tesla.maven/maven-model

if ( plugin.getExtensions() != null )
  serializer.startTag( NAMESPACE, "extensions" ).text( plugin.getExtensions() ).endTag( NAMESPACE, "extensions" );

代码示例来源:origin: org.jboss.forge.addon/maven-api

public MavenPluginAdapter(final org.apache.maven.model.Plugin plugin)
{
 org.apache.maven.model.Plugin clone = plugin.clone();
 setGroupId(clone.getGroupId());
 setArtifactId(clone.getArtifactId());
 setVersion(clone.getVersion());
 setConfiguration(plugin.getConfiguration());
 setExecutions(clone.getExecutions());
 setExtensions(clone.getExtensions());
 setDependencies(clone.getDependencies());
}

代码示例来源:origin: apache/maven-release

releasePlugin.setArtifactId( plugin.getArtifactId() );
releasePlugin.setVersion( version );
if ( plugin.getExtensions() != null )

代码示例来源:origin: com.github.htfv.maven.plugins/build-configurator-core

/**
 * Interpolates elements of the {@link Plugin} object.
 *
 * @param plugin
 *            {@link Plugin} object whose elements to interpolate.
 */
private void interpolatePlugin(final Plugin plugin)
{
  plugin.setArtifactId(
      interpolateString(plugin.getArtifactId()));
  plugin.setExtensions(
      interpolateString(plugin.getExtensions()));
  plugin.setGroupId(
      interpolateString(plugin.getGroupId()));
  plugin.setInherited(
      interpolateString(plugin.getInherited()));
  plugin.setVersion(
      interpolateString(plugin.getVersion()));
  interpolateDOM((Xpp3Dom) plugin.getConfiguration());
  interpolateDependencies(plugin.getDependencies());
  interpolateExecutions(plugin.getExecutions());
}

代码示例来源:origin: org.apache.maven/maven-model-builder

p.getExtensions(), p.getKey(), p );

相关文章