}
IExtension[] extensions = new IExtension[this.extensions.length];
for ( int i = 0; i < extensions.length; i++ )
{
final MavenExtension extension = this.extensions[i];
if ( extension.getExtensionArtifact() == null )
{
throw new IllegalArgumentException( "Extension artifact is required!" );
}
extensions[i] = new IExtension()
{
public File extension()
{
MavenArtifact a = extension.getExtensionArtifact();
Artifact resolvedArtifact =
resolve( a.getGroupId(), a.getArtifactId(), a.getVersion(), a.getClassifier(), a.getType() );
return resolvedArtifact.getFile();
}
public String[] parameters()
{
return extension.getParameters();
}
};
}
return extensions;