5 Replies Latest reply on Apr 15, 2015 12:40 AM by yingjieg

    How Jive 6 & 7 reuse the same function code

    yingjieg

      Hi All

       

      I developed a  plugin for Jive 7, I also want to install it on Jive 6 . It seems I need to create a jive 6 plugin structure and copy the file from jive 7 plugin to jive 6 plugin. Is there a good solution that the jive 7 and jive 6 plugin can share the same  function code ?

       

       

       

      BR
      Yingjie

        • Re: How Jive 6 & 7 reuse the same function code
          urvashi

          Hi Yingjie Guo,

           

          Have u tried once? using jive 7.0 code in jive 6.0?

          In my knowledge it should work, without changing in the code.

           

          Let us know, if it worked!

           

          Thanks!

          Urvashi

            • Re: How Jive 6 & 7 reuse the same function code
              yingjieg

              Hi Urvashi

               

              The plugin for Jive 7 compiled by JDK7, when I try to install it on Jive 6, it will told me "Error loading plugin: The plugin was compiled using a incopatiable JDK."

              So I create another project for Jive 6, the source code is same as Jive 7. I don't want there are two copy of same codes in Jive 6 and Jive 7.

              Do you have any ideas ?

               

              BR

              Yingjie

                • Re: How Jive 6 & 7 reuse the same function code
                  urvashi

                  Ok, yes according to the Doc of Building a plugin it won't work

                  NOTE: For Jive 7 projects, you will need to set up your system to use JDK 7.  It will not compile with Java 6.

                  Just try this out:

                  Optionally, if you're creating a 5/6/7.0 instance, you can specify the which kind of license, internal or external, you want the app to use.  By default, an internal license is used.  Use of an internal vs. an external license will affect some default settings, as well as which default profile fields are available from the system.  You can only specify this once.  If you need to change which license the app uses, you'll need to wipe the database and set the app up again.

                  I hope this will help you.

                   

                  Thanks!

                  Urvashi

                  1 person found this helpful
                  • Re: How Jive 6 & 7 reuse the same function code
                    Scott A Johnson

                    Hi Yingjie,

                     

                    Generally, plugins are not necessarily backwards compatible.

                     

                    Saying that, to fix the JDK version problem you could change the source and target properties in the maven-compiler-plugin configuration.


                    This is no guarantee that your plugin will run fine in Jive 6. There are other things to consider like dependencies on Jive Maven artifacts. You'll need to ensure that your plugin is built with the appropriate artifact versions for your target installation.


                    Jive 6 and Jive 7, while quite similar in architecture, have a lot of internal changes, meaning that any core classes you're dependent on may have changed and will require an update to your code for compatibility across the versions. Additionally, the UI has changed significantly between these two versions, so any front-end components may require tweaking. It all depends on what your plugin is doing, how much if any code will need to change.


                    Usually, when we're upgrading plugins, we rebuild a new plugin project using Jive's create-plugin maven task (found here How To: Create a Custom Jive Project), then migrate the source and resources across. If you've built your plugin in this way already, you could try to upgrade (or downgrade) using the task described in this post Upgrades Made Easy(er)


                    Hope this is helpful.


                    Scott

                    1 person found this helpful