当前位置: 首页>>代码示例>>Java>>正文


Java ReportPlugin.getArtifactId方法代码示例

本文整理汇总了Java中org.apache.maven.model.ReportPlugin.getArtifactId方法的典型用法代码示例。如果您正苦于以下问题:Java ReportPlugin.getArtifactId方法的具体用法?Java ReportPlugin.getArtifactId怎么用?Java ReportPlugin.getArtifactId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.maven.model.ReportPlugin的用法示例。


在下文中一共展示了ReportPlugin.getArtifactId方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: writeReportPlugin

import org.apache.maven.model.ReportPlugin; //导入方法依赖的package包/类
private void writeReportPlugin(ReportPlugin reportPlugin, String tagName, XmlSerializer serializer)
        throws java.io.IOException {
    serializer.startTag(NAMESPACE, tagName);
    flush(serializer);
    StringBuffer b = b(serializer);
    int start = b.length();
    if ((reportPlugin.getGroupId() != null) && !reportPlugin.getGroupId().equals("org.apache.maven.plugins")) {
        writeValue(serializer, "groupId", reportPlugin.getGroupId(), reportPlugin);
    }
    if (reportPlugin.getArtifactId() != null) {
        writeValue(serializer, "artifactId", reportPlugin.getArtifactId(), reportPlugin);
    }
    if (reportPlugin.getVersion() != null) {
        writeValue(serializer, "version", reportPlugin.getVersion(), reportPlugin);
    }
    if ((reportPlugin.getReportSets() != null) && (reportPlugin.getReportSets().size() > 0)) {
        serializer.startTag(NAMESPACE, "reportSets");
        for (Iterator iter = reportPlugin.getReportSets().iterator(); iter.hasNext();) {
            ReportSet o = (ReportSet) iter.next();
            writeReportSet(o, "reportSet", serializer);
        }
        serializer.endTag(NAMESPACE, "reportSets");
    }
    if (reportPlugin.getInherited() != null) {
        writeValue(serializer, "inherited", reportPlugin.getInherited(), reportPlugin);
    }
    if (reportPlugin.getConfiguration() != null) {
        writeXpp3DOM(serializer, (Xpp3Dom)reportPlugin.getConfiguration(), reportPlugin);
    }
    serializer.endTag(NAMESPACE, tagName).flush();
    logLocation(reportPlugin, "", start, b.length());
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:33,代码来源:LocationAwareMavenXpp3Writer.java

示例2: mergeReportPlugin_ArtifactId

import org.apache.maven.model.ReportPlugin; //导入方法依赖的package包/类
protected void mergeReportPlugin_ArtifactId( ReportPlugin target, ReportPlugin source, boolean sourceDominant,
                                             Map<Object, Object> context )
{
    String src = source.getArtifactId();
    if ( src != null )
    {
        if ( sourceDominant || target.getArtifactId() == null )
        {
            target.setArtifactId( src );
            target.setLocation( "artifactId", source.getLocation( "artifactId" ) );
        }
    }
}
 
开发者ID:gems-uff,项目名称:oceano,代码行数:14,代码来源:ModelMerger.java

示例3: addReportPluginAssociations

import org.apache.maven.model.ReportPlugin; //导入方法依赖的package包/类
private static void addReportPluginAssociations( VersionsHelper helper, ExpressionEvaluator expressionEvaluator,
                                                 Map<String, PropertyVersionsBuilder> result,
                                                 List<ReportPlugin> reportPlugins )
    throws ExpressionEvaluationException
{
    if ( reportPlugins == null )
    {
        return;
    }
    for ( ReportPlugin plugin : reportPlugins )
    {
        String version = plugin.getVersion();
        if ( version != null && version.contains( "${" ) && version.indexOf( '}' ) != -1 )
        {
            version = StringUtils.deleteWhitespace( version );
            for ( PropertyVersionsBuilder property : result.values() )
            {
                final String propertyRef = "${" + property.getName() + "}";
                if ( version.contains( propertyRef ) )
                {
                    // any of these could be defined by a property
                    String groupId = plugin.getGroupId();
                    if ( groupId == null || groupId.trim().length() == 0 )
                    {
                        // group Id has a special default
                        groupId = APACHE_MAVEN_PLUGINS_GROUPID;
                    }
                    else
                    {
                        groupId = (String) expressionEvaluator.evaluate( groupId );
                    }
                    String artifactId = plugin.getArtifactId();
                    if ( artifactId == null || artifactId.trim().length() == 0 )
                    {
                        // malformed pom
                        continue;
                    }
                    else
                    {
                        artifactId = (String) expressionEvaluator.evaluate( artifactId );
                    }
                    // might as well capture the current value
                    VersionRange versionRange =
                        VersionRange.createFromVersion( (String) expressionEvaluator.evaluate( plugin.getVersion() ) );
                    property.addAssociation( helper.createPluginArtifact( groupId, artifactId, versionRange ),
                                             true );
                    if ( !propertyRef.equals( version ) )
                    {
                        addBounds( property, version, propertyRef, versionRange.toString() );
                    }
                }
            }
        }
    }
}
 
开发者ID:mojohaus,项目名称:versions-maven-plugin,代码行数:56,代码来源:PomHelper.java

示例4: addReportPluginAssociations

import org.apache.maven.model.ReportPlugin; //导入方法依赖的package包/类
private static void addReportPluginAssociations( VersionsHelper helper, ExpressionEvaluator expressionEvaluator,
                                                 Map<String, PropertyVersionsBuilder> result,
                                                 List<ReportPlugin> reportPlugins )
    throws ExpressionEvaluationException
{
    if ( reportPlugins == null )
    {
        return;
    }
    for ( ReportPlugin plugin : reportPlugins )
    {
        String version = plugin.getVersion();
        if ( version != null && version.contains( "${" ) && version.indexOf( '}' ) != -1 )
        {
            version = StringUtils.deleteWhitespace( version );
            for ( PropertyVersionsBuilder property : result.values() )
            {
                final String propertyRef = "${" + property.getName() + "}";
                if ( version.contains( propertyRef ) )
                {
                    // any of these could be defined by a property
                    String groupId = plugin.getGroupId();
                    if ( groupId == null || groupId.trim().length() == 0 )
                    {
                        // group Id has a special default
                        groupId = APACHE_MAVEN_PLUGINS_GROUPID;
                    }
                    else
                    {
                        groupId = (String) expressionEvaluator.evaluate( groupId );
                    }
                    String artifactId = plugin.getArtifactId();
                    if ( artifactId == null || artifactId.trim().length() == 0 )
                    {
                        // malformed pom
                        continue;
                    }
                    else
                    {
                        artifactId = (String) expressionEvaluator.evaluate( artifactId );
                    }
                    // might as well capture the current value
                    VersionRange versionRange = VersionRange.createFromVersion(
                        (String) expressionEvaluator.evaluate( plugin.getVersion() ) );
                    property.addAssociation( helper.createPluginArtifact( groupId, artifactId, versionRange ),
                                             true );
                    if ( !propertyRef.equals( version ) )
                    {
                        addBounds( property, version, propertyRef, versionRange.toString() );
                    }
                }
            }
        }
    }
}
 
开发者ID:petr-ujezdsky,项目名称:versions-maven-plugin-svn-clone,代码行数:56,代码来源:PomHelper.java


注:本文中的org.apache.maven.model.ReportPlugin.getArtifactId方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。