本文整理汇总了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());
}
示例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" ) );
}
}
}
示例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() );
}
}
}
}
}
}
示例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() );
}
}
}
}
}
}