this seems to me an uphill task in SharePoint but is it possible to deploy the WSPs via SharePoint features. For instance, if we activate a certain feature then some specific SharePoint s开发者_运维知识库olutions (WSPs) should be deployed on SharePoint farm.
Yes.
You need to get a reference to the solution object itself via SPFarm.Solutions.
Once you have the SPSolution object, call Deploy (SPSolution.Deploy()) to deploy it.
SPSolutionCollection (returned by SPFarm.Solutions): http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.administration.spsolutioncollection_members.aspx
SPSolution Members: http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.administration.spsolution_members.aspx
精彩评论