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