Hi Nanda,
I found the easiest way was to:
1. drop the plugin as a directory inside my component with it's own manifest file etc. as per a normal component
2. in my component manifest file and a install script to be run as part of the component installation, using the below line in the manifest
<scriptfile>script.php</scriptfile>
3. in the install script add code for the postflight() method to install the plugin from the plugin dir:
class com_mycomponentInstallerScript
{
function postflight($type,$parent) {
//now install.
$installer = new JInstaller();
$installer->install($parent->getParent()->getPath('source').DS.'plugin');
}
}
4. zip the whole thing and install as per normal.
5. active the plugin in the plugin manager.
Eric.