mapArtifactIdToPluginHousing( artifactId, housing );
}
else
{
throw new MavenException( "Not a valid plugin file: " + file );
}
LOGGER.debug( "Installing plugin: " + housing );
// By default, not caching the plugin - its a per execution installation
housing.parse( transientMapper );
// Should only be putting in the transientMapper - but it is not consistent with isLoaded
housing.parse( mapper );
if ( cache )
{
FileUtils.copyFileToDirectory( file, userPluginsDir );
cacheManager.registerPlugin( pluginName, housing );
housing.parse( cacheManager );
cacheManager.saveCache( unpackedPluginsDir );
}
}
else
{
throw new MavenException( "Not a valid JAR file: " + file );
}
}
catch ( IOException e )
{
throw new MavenException( "Error installing plugin", e );
}
}