if ( reports != null )
{
for ( Iterator i = reports.iterator(); i.hasNext(); )
{
ReportPlugin p = (ReportPlugin) i.next();
String version;
if ( StringUtils.isEmpty( p.getVersion() ) )
{
version = "RELEASE";
}
else
{
version = p.getVersion();
}
Artifact artifact;
try
{
artifact = artifactFactory.createPluginArtifact( p.getGroupId(), p.getArtifactId(),
VersionRange.createFromVersionSpec( version ) );
}
catch ( InvalidVersionSpecificationException e )
{
throw new ProjectBuildingException( projectId, "Unable to parse version '" + version +
"' for report '" + ArtifactUtils.versionlessKey( p.getGroupId(), p.getArtifactId() ) + "': " +
e.getMessage(), e );
}
if ( artifact != null )
{