2 Replies Latest reply on Nov 23, 2016 5:48 AM by spsenthilrm

    Automate custom-plugin.jar upload via CURL command instead of admin interface

    spsenthilrm

      Is there a way we can upload our custom-plugin.jar files dynamically via build process automation i.e, in continuous deployment / continuous deployment - when i am making some code changes and committing to version control.

      Building the jar i can do using mvn command but how to deploy the jar file dynamically to the targeted environment jive system ?!! Via Curl (or) Rest API calls  -> what is the command or is there any other way we can do it instead of using standard interface. I want to do it automatically.

        • Re: Automate custom-plugin.jar upload via CURL command instead of admin interface
          mcollinge

          On our local machines we use a piece of simple SQL to upload the plugin into the database after it's been built.. restarting the application then deploys it.

           

          %MYSQL% --user=xxx --password=yyy --database=element14v8 -e "UPDATE jiveplugin SET data = (load_file(\"C:/jive/Project/Element14-v8/plugins/javascript-libraries/target/javascript-libraries.jar\")) WHERE name = \"javascript-libraries\";"
          

           

          You can also add plugin folders from the file system in the web/pom.xml file, e.g.

           

          <properties>
              <plugin.dirs>
                  ${basedir}/../plugins/javascript-libraries/target/javascript-libraries,
                  ${basedir}/../plugins/static-content/target/static-content
              </plugin.dirs>
          </properties>
          

           

          That second method means those plugins will be locked down in the admin console, preventing you from uploading new versions on the fly.. i.e. they always have to come from the file system.

            • Re: Automate custom-plugin.jar upload via CURL command instead of admin interface
              spsenthilrm

              Thanks for Providing the valuable inputs. Can you please clarify the below two queries ?

               

              01. how to identify a plugin already exist, whether i need to handle in the shell script and do a insertion / update accordingly ?!! How i can make this dynamic, based on the code sync, i need to identify the unique plugins and trigger this action right ?!

               

              02. The location of the created custom plugin jar files will get resided ?!! because i m only seeing the .class files in the application/sbs/home folder .