I want to install jenkins plugin programmatically using java. can any one help me on this?
            Asked
            
        
        
            Active
            
        
            Viewed 357 times
        
    1 Answers
3
            
            
        You can access Jenkins remotely using the remote api . This can be used to install plugins as well, look at this gist and for example:
curl -X POST -d '<jenkins><install plugin="git@2.0" /></jenkins>' --header 'Content-Type: text/xml' http://localhost:8080/pluginManager/installNecessaryPlugins
will install the git plugin. So by using some HTTP library in Java you can do this from Java as well, posting HTTP requests to the remote api and installing plugins.
 
    
    
        Peter Svensson
        
- 6,105
- 1
- 31
- 31
- 
                    Using remote api,i dint find any way like how to give the line "- 
                    Something like this? http://stackoverflow.com/questions/4205980/java-sending-http-parameters-via-post-method-easily – Peter Svensson Feb 02 '14 at 06:31
