When you build your OSGi bundle using Maven -- you can use the following Maven plug-in to automatically deploy the bundle:
<
profile
>
<
id
>autoInstallBundle</
id
>
<
build
>
<
plugins
>
<
plugin
>
<
groupId
>org.apache.sling</
groupId
>
<
artifactId
>maven-sling-plugin</
artifactId
>
<
executions
>
<
execution
>
<
id
>install-bundle</
id
>
<
goals
>
<
goal
>install</
goal
>
</
goals
>
</
execution
>
</
executions
>
</
plugin
>
</
plugins
>
</
build
>
</
profile
>
TO see a full example -- see:
http://scottsdigitalcommunity.blogspot.ca/2013/03/creating-adobe-cq-shopping-cart.html